how many for loops in javascript