js 循环froEach

let addr = [1, 2, 3, 4, 5];
Object.keys(addr).forEach(index => {
console.log(addr[index])
})
let dict = {
"name": "张三",
"age": "18",
};
Object.keys(addr).forEach(key => {
console.log(addr[index])
})
posted @ 2022-12-08 09:31  167  阅读(23)  评论(0)    收藏  举报