Skip to content

repl: declare for initial expression in the for loop, instead of hoisting and re-using

There was a for loop that had an initial Expression that wasn't using let/var, this adds a let to it

I also noticed that this module uses var instead of let/const. I saw in another issue,https://github.com/nodejs/node/issues/28009#issuecomment-497981115 , the reasoning for why they haven't been updated yet. But since i am touching this file, I would like to try to do the conversion for this file. If someone else agrees i can push another commit with those updates, if not, then i'll just keep this PR as is

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading