Advertisements
Advertisements
Question
What are the different types of control statement used in JavaScript?
Advertisements
Solution
There are two types of control statements are used in JavaScript. They are:
- Branching/Selection
- Looping/Repetitive
APPEARS IN
RELATED QUESTIONS
Which statement in switch case is used to exit the statement once the appropriate choice is found?
Which of the following is not a branching statement?
The _______ statement is especially useful when testing all the possible results of an expression.
Differentiate the break and continue 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?
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?
Which of the following is not true with regards to a switch statement?
Rewrite the following code using single if statement.
if(code=='g')
System.out.println("GREEN");
else if(code=='G')
System.out.println("GREEN");