Advertisements
Advertisements
प्रश्न
List out the various branching statements in JavaScript?
Advertisements
उत्तर
There are different branching statements. They are:
- if statement
- if… else statement
- else if statement
- switch statement
APPEARS IN
संबंधित प्रश्न
Which of the following is not a branching statement?
What will be the output for the following snippet:
For (var n=0; n<10; n++)
{
if (n==3)
{
break;
}
document write (n+”<br>”);
}In which loop the condition is evaluated, before executing a statement?
The _______ statement is especially useful when testing all the possible results of an expression.
What are the different types of control statement used in JavaScript?
Write the general syntax for switch statement.
Differentiate the break and continue statement.
The absence of which statement leads to fall through situation in switch case statement?
Which of the following data type cannot be used with switch case construct?
Rewrite the following code using single if statement.
if(code=='g')
System.out.println("GREEN");
else if(code=='G')
System.out.println("GREEN");