subject

In this exercise we are going to practice validating a password to confirm it contains letters and numbers using simple regular expressins. This exercise uses if statements to find a valid password instead of finding an invalid one. Inside the if statement that is already in the checkPassword(e) function: Create 2 variables, reA and reB. Assign one of the variables the regular expression for a number, assign the other the regular expression that will match any uppercase or lowercase letter. Place your regular expressions between //. Unlike the examples in lecture, you do not want to use ^ at the start of your regular expression or the $ at the end because that requires that you match ALL characters in the string instead of just looking for one. Create a second if statement (nested inside the first if statement) that checks if the password matches both regular expression variables: Call the test method on reA and pass it the value of the password entered in the pwd input. Call the test method on reB and pass it the value of the password entered in the pwd input. Note: Use a single if statement that checks that both of these validation conditions are true. Inside the body of the nested (inner) if statement: Set the disabled property of the submit variable to true (because the element passed validation). return true

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
The following is an excerpt from a slide presentation. today we will inverse operations solving equations using inverse operations solving inequalities using inverse operations from which part of the presentation does the slide most likely come from? a. introduction b. outline c. body d. conclusion
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
What is the most popular genre of video games?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
You know the right answer?
In this exercise we are going to practice validating a password to confirm it contains letters and n...
Questions
question
Spanish, 30.03.2021 04:20
Questions on the website: 13722359