MV block-scoped declarations not yet supported outside strict mode

Hello! A friend gave me this code. He just installed the MV free 20 day trial version, coded this and worked in his PC. Then I tried this code in my machine, and the "block-scoped declarations not yet supported outside strict mode" error happens.

Code:
let numeroEventos = 3;
if ($gameVariables.value(1000) < numeroEventos) {
     for (var i = 0; i < 99999; ++i) {
          let iEvento = Math.randomInt(numeroEventos)+1;
          if ($gameVariables.value(iEvento+185) == 0) {
               $gameVariables.setValue(iEvento+185, 1);
               $gameTemp.reserveCommonEvent(iEvento+1);
               $gameVariables.setValue(1000, $gameVariables.value(1000)+1);
               break;
          }
     }
}
put "use strict" at the beginning of it.

This is most likely because the version of node your project is running on is less up to date than your friend's was, so check to see if there are any core updates available.
Moved to: Plugin Support
put "use strict" at the beginning of it.

This is most likely because the version of node your project is running on is less up to date than your friend's was, so check to see if there are any core updates available.
Thank you so much! It´s working! 😀

Original thread: https://forums.rpgmakerweb.com/threads/block-scoped-declarations-not-yet-supported-outside-strict-mode.136934/