for loop in javascript