Question PRG-JS-0043
MediumWhat is the output of this program?
for (var i = 0; i < 3; i++) setTimeout(() => process.stdout.write("v" + i + " "), 0);
for (let j = 0; j < 3; j++) setTimeout(() => process.stdout.write("l" + j + " "), 0);
- A.
v3 v3 v3 l0 l1 l2
- B.
v0 v1 v2 l0 l1 l2
- C.
Sign up free to see the answer and a step-by-step explanation.