HTML, CSS & JavaScript – Lesson 3 Review KS3
Quiz Summary
0 of 10 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 10 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- HTML CSS and JavaScript 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- Current
- Review
- Answered
- Correct
- Incorrect
-
Question 1 of 10
1. Question
What is the purpose of an IF statement in JavaScript?
CorrectIncorrect -
Question 2 of 10
2. Question
Which of the following is a correct JavaScript IF statement?
CorrectIncorrect -
Question 3 of 10
3. Question
How does JavaScript retrieve user input from an input field?
CorrectIncorrect -
Question 4 of 10
4. Question
What will happen if a user enters an age of 20 in the bartender program? Below is a reminder of the main function involved.
function barman() { var age = document.getElementById("age").value if (age >= 18) { alert("What can I get you?") } else { alert("Not old enough to be served - Go Home!") } }CorrectIncorrect -
Question 5 of 10
5. Question
What happens in an IF-ELSE statement when the IF condition is false?
CorrectIncorrect -
Question 6 of 10
6. Question
What operator is used to check if a value is greater than or equal to another value?
CorrectIncorrect -
Question 7 of 10
7. Question
How can we ensure user input is treated as a number in JavaScript?
CorrectIncorrect -
Question 8 of 10
8. Question
What would happen if a user enters text instead of a number in the bartender program? Below is a reminder of the main function involved.
function barman() { var age = document.getElementById("age").value if (age >= 18) { alert("What can I get you?") } else { alert("Not old enough to be served - Go Home!") } }CorrectIncorrect -
Question 9 of 10
9. Question
Which statement correctly checks if a user’s input is exactly equal to 18?
CorrectIncorrect -
Question 10 of 10
10. Question
Why are IF statements important in programming?
CorrectIncorrect