Back to course home
0% completed
Vote For New Content
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...
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
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 {};
Which keyword is used to exit a switch statement early?
A
exit
B
break
C
continue
D
return
.....
.....
.....
Like the course? Get enrolled and start learning!
Table of Contents
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible