Friday , September 20 2024

Analyze the following code: let a = 10; do { console.log(a–); } while (a > 3); Which statement can replace the do … while from the example above?

Questions BankCategory: JavaScript Essentials 1Analyze the following code: let a = 10; do { console.log(a–); } while (a > 3); Which statement can replace the do … while from the example above?
Analyze the following code:

let a = 10;
do {
    console.log(a--);
} while (a > 3);

Which statement can replace the do ... while from the example above?

  • while (a > 2) console.log(--a);
  • while (a > 4) console.log(--a);
  • while (a > 3) console.log(a--);
  • while (a >= 3) console.log(a--);

More Questions: JavaScript Essentials 1 – JSE1: Module 4 Test