题解 | #属性遍历#
属性遍历
http://www.nowcoder.com/practice/0158a4f165154f2eaf27d1907aa55e57
function iterate(obj) {
const ary = []
Object.keys(obj).forEach(item => {
ary.push(`${item}: ${obj[item]}`)
})
return ary
}
属性遍历
http://www.nowcoder.com/practice/0158a4f165154f2eaf27d1907aa55e57
function iterate(obj) {
const ary = []
Object.keys(obj).forEach(item => {
ary.push(`${item}: ${obj[item]}`)
})
return ary
}
相关推荐