The order is for (var i = 1; i < 5; i++) {, console.log(i);, then }.
for (var i = 1; i < 5; i++) {
console.log(i);
}