这个文章随着以后的知识增加而在写吧!
现就这么多吧!
for语法2: index 代表下标
for(let index in data){
console.log("测试for循环")
let user = data[index];
alert(user.name);
}
for语法3: user当前循环遍历的对象
for(let user of data){
console.log("for循环测试:"+user.name);
}
这个文章随着以后的知识增加而在写吧!
现就这么多吧!
for语法2: index 代表下标
for(let index in data){
console.log("测试for循环")
let user = data[index];
alert(user.name);
}
for语法3: user当前循环遍历的对象
for(let user of data){
console.log("for循环测试:"+user.name);
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。