Echo JS 0.11.0

<~>
xat 2641 days ago. link 2 points
Not sure if this was made 100% clear in the article (although it's mentioned), but instead of an IIFE you can also use 'let' in the last example:

for (let i = 0; i < 5; i++) {
  setTimeout(function () {
    console.log('index: ' + i);
  }, 1000);
}

Replies