Question: Q1. Write a JavaScript program to test the first character of a string is uppercase or not. Add a text control for input, a div
Q1. Write a JavaScript program to test the first character of a string is uppercase or not. Add a text control for input, a div for the output and a button. If the input starts with a capital letter display Capital, Wrong format otherwise must be displayed via the div.
Q2. Write a JavaScript program to check a student number. Add a text control for input, a div for the output and a button. If input fits than Valid, nvalid otherwise must be displayed via the div.
A total of 8 digits;
- First two digits should be 20,19,18 or 17.
- Second two digits must be 25,35,39 or 32.
- Last 4 digits should be between 0000 and 9999.
Q3. Write a JavaScript function to check whether a given value is IP value or not. Add a text control for input, a div for the output and a button. If input fits than Valid, nvalid otherwise must be displayed via the div.
255.255.255.255 is the maximum value
Q4. Write a JavaScript function to check whether a given phone number belongs to Mausa or not. Add a text control for input, a div for the output and a button. If input fits than Valid, nvalid otherwise must be displayed via the div.
Phone numbers in mausa is 7 digits and starts with 36.
Q5. Write a JavaScript function to count the number of vowels in a given string. Add a text control for input, a div for the output and a button. Display result of counting via the div.
(Hint: .match)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
