[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

React(17) - Render props

React(17) - Render props

[19] 原生功能 Natives - Symbol、Native Prototypes

[19] 原生功能 Natives - Symbol、Native Prototypes

DJI Tello 的基礎操作與套件

DJI Tello 的基礎操作與套件


Comments