Advertisements
Advertisements
Question
What will be the output for the following snippet:
For (var n=0; n<10; n++)
{
if (n==3)
{
break;
}
document write (n+”<br>”);
}Options
0 1 2
0 1 2 3
0 1 2 3 4
0 1 3
Advertisements
Solution
0 1 2
APPEARS IN
RELATED QUESTIONS
_______ statement can be used as alterative to if-else statement.
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.
What is if statement and write its types.
What message will be displayed, if the input for age is given as 20, for the following snippet?
Which of the following data type cannot be used with switch case construct?
Which of the following is not true with regards to a switch statement?
