JavaScript Programming/While Loops/Example Code