Advertisements
Advertisements
प्रश्न
What will be the output for the following snippet:
For (var n=0; n<10; n++)
{
if (n==3)
{
break;
}
document write (n+”<br>”);
}विकल्प
0 1 2
0 1 2 3
0 1 2 3 4
0 1 3
MCQ
Advertisements
उत्तर
0 1 2
shaalaa.com
Introduction of Conditional Statements in Java
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
APPEARS IN
संबंधित प्रश्न
Which statement in switch case is used to exit the statement once the appropriate choice is found?
What are the different types of control statement used in JavaScript?
List out the various branching statements in JavaScript?
Write the general syntax for switch statement.
Write the syntax for else-if statement.
What message will be displayed, if the input for age is given as 20, for the following snippet?
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 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");