for (var i = 0; i < 5; i++){ //TODO } console.log(i); //5 for (let i = 0; i < 5; i++){ //TODO } console.log(i); // ReferenceError: i is not defined