Javascript lesson

made while loop, debugged