遍历对象里的每个元素
var obj ={ a:32, b:12, c :342 } for (const key of obj){ if(obj.hasOwnProperty(key)){ console.log(key,obj[key]); } }