• Isn't this a recursive call that will call itself until all memory is consumed?

    (function lo(op){
        console.log(incInput());
        return sleep(5, function(){
          return lo(op);
    
  • I guess no, since sleep (is setTimeout under the hood) schedules lo(op) call and previous execution of lo(op) ends there. Which means there is nothing related with lo(op) function's execution within this 5ms duration.

About

Avatar for ceremcem @ceremcem started