for loops in JS