循环结构
forEach循环
1 var age = [1, 2, 3, 4] 2 3 // 函数 4 age.forEach(function (value) { 5 console.log(value) 6 })
for...in...
1 // for(var index in object){} 2 3 for (var num in age) { 4 console.log(num); 5 }
posted on 2021-05-06 14:49 Love&Share 阅读(37) 评论(0) 收藏 举报
浙公网安备 33010602011771号