[JS] 迴圈: while loop 、 for loop 結構與執行流程


Posted by OsmandLN on 2021-08-31

while loop 結構 :

宣告: ex: let i = 1

while (執行條件 ex: i <= 5) {
執行程序 / 動作 ex: console.log(' ')
迭代變化 ex: i = i + 1
}

while loop flow :

for loop 結構 :

for(宣告 ex: let i = 1 ; 執行條件 ex: i <= 5 ; 迭代變化 ex: i = i + 1) {
執行程序/動作 ex: console.log(' ')
}

for loop flow :


#javascript #While Loop #For Loop







Related Posts

資訊安全:XSS

資訊安全:XSS

C 語言練習程式(8) -- 可應付不同型態的function(generic function)寫法 -- 指標相關程式集錦(7)

C 語言練習程式(8) -- 可應付不同型態的function(generic function)寫法 -- 指標相關程式集錦(7)

[Release Notes] 20210222_v1 - Refined Main site dark mode style

[Release Notes] 20210222_v1 - Refined Main site dark mode style


Comments