javascript: while