📜  javascript objectentries - Javascript 代码示例

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

代码示例1
const obj = { toto: "truc", bidule: 42 };
Object.entries(obj).forEach(
  ([clé, valeur]) => console.log(`${clé}: ${valeur}`)
);
// "toto: truc"
// "bidule: 42"