「while 繰り返し」-サンプルページ-
function hoge(){ i=0; while (i<10) { document.write(i+"<br />"); i++; } document.write("終了!!"); }