JavaScript 4-1_ループ処理

[WEB][JavaScript 4-1-ループ処理]
 continue
function f1(){ var a = "" var b = 11 var cntMin = 0 var cntMax = 20 for(i=cntMin;i<cntMax;i++){ if (i < b) continue a = a+=i+" "; } document.getElementById("t1").innerText=a; }
 break
function f2(){ var a = "" var b = 11 var cntMin = 0 var cntMax = 20 for(i=cntMin;i<cntMax;i++){ if (i > b) break a = a+=i+" "; } document.getElementById("t2").innerText=a; }
 jump:
function f3(){ var a = "" var b = 5 var cntMin = 0 var cntMax = 9 for(i=0;i<10;i++){ jump: for(j=cntMin;j<cntMax;j++) { if (i == b) break jump; a = a+=i+" "; } } document.getElementById("t3").innerText=a; }
<< 前のページへ >> | << 次のページへ >>