js取对象的属性值循环

var data = {name: "liuyang", job: "web", age: "27"}
Object.keys(data).forEach(key => {
     // to do something
})

 

posted @ 2018-05-31 20:34  Jack-liu  阅读(697)  评论(0编辑  收藏  举报