📌  相关文章
📜  循环遍历对象 js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:09.327000             🧑  作者: Mango

代码示例6
var obj = {
  first: "John",
  last: "Doe"
};

//
//    Visit non-inherited enumerable keys
//
Object.keys(obj).forEach(function(key) {

  console.log(key, obj[key]);

});