Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DOCTYPE html html head Title Final title script function final ( ) { Question No . 6 ( 1 0 pts ) : Write a

DOCTYPE html
html
head
Title Final title
script
function final(){
Question No.6(10pts) : Write a statement to get the input from the user and assign it to a "let" type variable called 'userInput'*/
var lowerCaseLetter =/[a-z]/g; // regular expression a-z
var upperCaseLetter =/[A-Z]/g; // regular expression A-Z
var number =/[1-9]/g; //// regular expression 1-9
var a=[];
Question No.7(20pts) :
Given that "userInput.match(regular expression)" is the function to check if the userInput match the regular expression or not and its return value is null when not matching.
Given that "userInput.length" is the length of the user input.
Write "if-else" statements to check if the user input meet each requirement or not.
You can use integer array a=[] to store the comparison results, so the sum of the comparison results can be used as a unique number to reflect if the user input met the requirements or not.
Question No.8(20pts) : Use the result of Question No.7 as the value of case to in "switch-case" statement to output the appropriate error when the user input meet or does not meet one or more requirements
}
script
head
body
form>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

Is it too complicated or confusing?

Answered: 1 week ago