对象结构:
info = {name: "xiaoming", age: 10, grade: "二年级"}
foreach:
Object.keys(info).foreach((value, key) => {
console.log(value)
})
for in:
for (let i in info) {
console.log(info[i])
}
对象结构:
info = {name: "xiaoming", age: 10, grade: "二年级"}
foreach:
Object.keys(info).foreach((value, key) => {
console.log(value)
})
for in:
for (let i in info) {
console.log(info[i])
}