1、
let d = {'a': 1, 'b': 2, 'c': 3}
for (const key in d){
console.log(key, d[key])
}
2、
let d = {'a': 1, 'b': 2, 'c': 3}
for (const [key, value] of Object.entries(d)){
console.log(key,value)
}
1、
let d = {'a': 1, 'b': 2, 'c': 3}
for (const key in d){
console.log(key, d[key])
}
2、
let d = {'a': 1, 'b': 2, 'c': 3}
for (const [key, value] of Object.entries(d)){
console.log(key,value)
}