let obj = {name:'Mary',num:10,age:18 };
let arr = [];
for(let i in obj){
arr.push(obj[i])
}
console.log(arr)
本文标题:js对象转数组
本文链接:https://www.haomeiwen.com/subject/iyijoftx.html
网友评论