const cg_arr= {titel: '家具',price: '100',}//遍历key和valueconst keys = Object.keys(cg_arr)keys.forEach(function (item,key) {console.log("item:" + item,"value:"+cg_arr[item])})打印item:titel value:家具item:price value:100
700字范文,内容丰富有趣,生活中的好帮手!
时间:2023-11-15 01:45:38
const cg_arr= {titel: '家具',price: '100',}//遍历key和valueconst keys = Object.keys(cg_arr)keys.forEach(function (item,key) {console.log("item:" + item,"value:"+cg_arr[item])})打印item:titel value:家具item:price value:100