lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2.01k stars 43 forks source link

Something wrong with for loop #566

Closed JuanCamiloSalas closed 1 year ago

JuanCamiloSalas commented 1 year ago

Hi there, I would like you to run this code:

function loop() {
  for (let i = 0; i < 5; i++) {
    if (i === 2) continue;
    console.log(i);
  }
  console.log("console.log after the for, it must be after of 4")
}

loop();

It is going to print the last console.log before the print of 3 y 4.

lukehaas commented 1 year ago

@JuanCamiloSalas please see the explanation for this here: https://github.com/lukehaas/RunJS/issues/497

JuanCamiloSalas commented 1 year ago

Resolved! Thanks a lot!