1. 使用c语言的for语法:
for (init; condition; end){
//代码
}2. for of语法:
child::for of
不推荐的for in
child::for in
遍历方法对比
- forEach与for…of的区别 - forEach 和 for…of 的详细对比分析
for (init; condition; end){
//代码
}for of语法:child::for of
for inchild::for in