Army of functions

Task

for (var i = 0; i < 4; i++) {
  setTimeout(() => console.log(i), 0)
}

The Issue

Expected:

Actual:

Made with Slides.com