📌  相关文章
📜  将对象转换为数组 javascript 代码示例

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

代码示例6
const numbers = {
  one: 1,
};

const objectArray = Object.entries(numbers);

objectArray.forEach(([key, value]) => {
  console.log(key); // 'one'
  console.log(value); // 1
});