Font size
WorksheetsSwitch case
Total questions: 10
Worksheet time: 7mins
By the ? keyword, the other cases will not be executed and the program continues executing the code after the switch case if there is more code.
Which is the "?" keyword?
(a)
The code inside the ? case will be executed if the expression doesn't correspond to the other cases.
Which is the "?" case?
(a)
What we can use, if we want to execute certain code in situation, that the expression doesn't corresponds to the other cases that we have?
The default case
The break case
If case
We can't execute that code
What is the keyword that we use, when we want to have different cases based on the expression's value?
switch
Switch
if
default
Can I make a switch case without inserting code to be executed in the default case?
No
Yes
Can you use if case instead of switch case?
Yes
No
Is that correct?
switch (number < 10) ...
Yes
No
Choose the correct answer
case "cat":
case: cat
case: "cat"
case cat:
Is that correct "case 5:"?
Yes
No
Is that correct?
case "s":
Yes
No
