while loop in js