Examine the following code:
for (let a = 5; a > 1; a--) { console.log(a); } ;
Which statement can replace the for
from the example above?
let a = 1; while (a < 5) console.log(a++);
let a = 5; while (a > 1) console.log(a++);
let a = 6; while (a >= 1) console.log(a--);
let a = 5; while (a > 1) console.log(a--);
More Questions: JavaScript Essentials 1 – JSE1: Module 4 Test
Please login or Register to submit your answer