Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

In the ………. loop, body of the loop always executed at least once before the condition is checked?(a) for(b) while(c) if(d) do while

Answer»

Correct answer is(d) do while

2.

The ……… statement is especially useful when testing all the possible results of an expression?(a) while(b) do while(c) switch(d) if

Answer»

Correct answer is(a) while

3.

What is meant by conditional statements in JavaScript?

Answer» Conditional statements execute or skip one or set of statements depending on the value of a specified conditional expression.
4.

What are the different types of control statement used in JavaScript?

Answer»

There are two types of controls,

1. Branching / Selection

2. Looping / repetitive

5.

Differentiate the break and continue statement?

Answer»

Break Statement:

1. The break statement will terminate the loop early.

2. The break statement is executed and the loop is terminated.

Continue Statement:

1. The continue statement will skip back to the loop condition check.

2. When the continue statement is executed, the current is iteration of the enclosing loop is terminated.

6.

Write the syntax of the if else statement?

Answer»

if (expression)

{

statements if true

} else

{

statements if false

}

7.

Write a short note on continue statement?

Answer»

The continue statement will skip back to the loop condition check. When the continue statement is executed, the current iteration of the enclosing loop is terminated, and the next iteration begins.