Advertisements
Advertisements
Question
The _______ statement is especially useful when testing all the possible results of an expression.
Options
While
Do while
Switch
If
Advertisements
Solution
The switch statement is especially useful when testing all the possible results of an expression.
APPEARS IN
RELATED QUESTIONS
Which statement in switch case is used to exit the statement once the appropriate choice is found?
What will be the output for the following snippet:
For (var n=0; n<10; n++)
{
if (n==3)
{
break;
}
document write (n+”<br>”);
}What are the different types of control statement used in JavaScript?
What is meant by conditional statements in JavaScript?
List out the various branching statements in JavaScript?
What message will be displayed, if the input for age is given as 20, for the following snippet?
Explain switch case statement with example.
The absence of which statement leads to fall through situation in switch case statement?
Give the output of the following program segment:
int n = 4279; int d;
while(n>0)
(d=n%10;
System.out.println(d);
n=n/100;
}Which of the following is not true with regards to a switch statement?
