JavaScript From Beginner To Advanced
0% completed
Previous
Next
Course
Discussions
Quiz
How do you write an if statement in JavaScript?
A
if x > 10 then...
B
if (x > 10)...
C
if x > 10 : ...
D
if: x > 10...
Reset Quiz
Check Answer
What does the switch statement in JavaScript do?
A
It executes a block of code a number of times
B
It declares a variable
C
It checks for the type of a variable
D
It evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case
Reset Quiz
Check Answer
Which syntax correctly represents using if, else if, and else together?
A
if(condition) {} else if(condition) {} else if(condition) {} else {}
B
if(condition) {}; else if(condition) {}; else {}
C
if: (condition) {} else if: (condition) {} else: {}
D
if (condition) {}; elseif (condition) {}; else {};
Reset Quiz
Check Answer
Which keyword is used to exit a switch statement early?
A
exit
B
break
C
continue
D
return
Reset Quiz
Check Answer
.....
.....
.....
Like the course? Get enrolled and start learning!
Enroll
Previous
Next