Which of the following is not a loop instruction in JavaScript?
for ... in
do ... while
for ... of
if ... else
Explanation & Hint:
The “if … else” statement is not a loop instruction in JavaScript. The “if … else” statement is a conditional statement used to perform different actions based on a condition. It does not involve repetition or looping over a set of values or elements. It allows you to specify different code blocks to be executed based on whether a condition is true or false. |