Report Bug

Qus

What will be the output of the following JavaScript code?

let i = 0;
while(i < 3) {
  console.log(i);
  i++;
}
Qus

निम्नलिखित जावास्क्रिप्ट कोड का आउटपुट क्या होगा?

let i = 0;
while(i < 3) {
  console.log(i);
  i++;
}


A. 0 1 2
B. 1 2 3
C. 0 1 2 3
D. 1 2


Solution
A. 0 1 2



Explanation
The loop starts at i = 0 and runs while i < 3. It increments i after each iteration, printing 0, 1, and 2.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad