How many conditions can be checked in a chained if-else statement?
Which symbol is used to represent the logical 'OR' operatoe in a chained if-else statement?
What is the purpose of the 'default' case in a switch statement?
10. The if statements are used when an if statement is present inside another if statement.
6. The syntax of an if-else statement is: if :
statement1
statement2
else:
statement3
statement4
Which statement is used to skip the current iteration of a loop in JavaScript?
When would you use switch statements?
What is the syntax for a switch statement in JavaScript?
What happens if none of the cases in a switch statement match the expression value?
9. The syntax of the switch statement is:
switch () {
case value1:
// code to be executed for value1
break;
case value2:
// code to be executed for value2
break;
default:
// code to be executed if none of the cases match
}
Execution path
Condition
5. The if-else statement allows for execution paths.
What is the purpose of an else statement in a nested if-else statement?
What are switch statements?
What is the purpose of else if statements in if-else statements?
Switch statement
4. The syntax of an if statement is: if :
statement1
statement2