Selection in JavaScript (OCR A-Level Computer Science): Quizzes
📚Quizzes
Practise the questions
7 questions from this quiz
ShowHide
Practise the questions
7 questions from this quiz
What do selection structures do in JavaScript?
What do selection structures do in JavaScript?
Make decisions based on conditions
Which statements are used for selection in JavaScript?
Which statements are used for selection in JavaScript?
if, else, and switch
What does if...else execute code based on?
What does if...else execute code based on?
A true or false condition
When is the switch statement particularly useful?
When is the switch statement particularly useful?
For multiple conditions
In the example, what prints if age is 18?
In the example, what prints if age is 18?
You are an adult.
What is a common mistake with conditions?
What is a common mistake with conditions?
Not properly formatting and closing them
What do selection structures control?
What do selection structures control?
Program flow based on conditions
