• most JS interpreters scan ahead for new function definitions within its current scope

    (function(){
      
      console.log("level 1");
      
      return lvl2();
      
      function lvl2(){
        console.log("level 2");
      }
      
    })();
    

    Espruino's JS does not

About

Avatar for bmatusiak @bmatusiak started