javascript for each in range