Code Analysis Magic Quiz

Test your knowledge of Code Analysis by answering this quiz!
Question about JavaScript Basics II

Given the following while loop

  // A
  while (i < 99) {
    console.log(i);
    i += 1;
  }
  // B
  for (; i < 99; i++) { // no need for "begin"
    console.log(i)
  }
  // C
  do {
    console.log(i);
    i = i + 1;
  } while (i < 99);

Which block will print a different result to the others?


Not sure about the answer? Want to learn more?
Check out this learning:
JavaScript Basics IILast updated today
View Learning
SkillMagic

How It Works