The code will output: 3 3 3 (after 1 second). This is due to the use of var for the loop variable i, which has function scope rather than block scope. By the time the setTimeout callbacks execute after 1 second, the loop has already completed, and i has the value 3 (the value that caused the loop condition i < 3 to become false). All three callbacks reference the same i variable, which is now 3. This is different from using let, which would create a new block-scoped variable for each iteration, resulting in 0 1 2 being logged.