score:0

function num() {
  for ( var i = 1; i <= 4; i++) {
    setTimeout( function() {
      console.log(i); // 👈 this should print '5' five times 
    }, i * 1000)
  }
}
num()

Related Query

More Query from same tag