for (var count = 0; count < 5; count++) {
  setTimeout(() => console.log(count));
}

Назад