Question
I need both html and js forms. 1. Declare a variable called name and give it a string value of your name. 2. Declare a
I need both html and js forms.
1. Declare a variable called "name" and give it a string value of your name.
2. Declare a variable called "age" and give it a numeric value of your age.
3. Declare a variable called "isStudent" and give it a Boolean value of whether or not you are currently a student.
4. Use console.log() to print out the values of the variables you just declared.
5. Reassign the "age" variable with a new value, add 1 or 2 to the current value.
6. Log the value of the "age" variable again to check if it has been updated correctly.
7. Declare a variable called "temperature" and give it a numeric value representing the current temperature in degrees Fahrenheit.
8. Use an if statement to check if the temperature is below freezing (32F). If it is, print "The temperature is below freezing" to the console.
9. Create a variable login_attempts and give it a numeric value representing the number of login attempts made by a user.
10. Using an if statement, check if login_attempts is greater than 3, if true, print "Too many login attempts" to the console, else print "login success"
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started