javascript objectentries code example
Example: javascript objectentries
const obj = { toto: "truc", bidule: 42 };
Object.entries(obj).forEach(
([clé, valeur]) => console.log(`${clé}: ${valeur}`)
);
// "toto: truc"
// "bidule: 42"
const obj = { toto: "truc", bidule: 42 };
Object.entries(obj).forEach(
([clé, valeur]) => console.log(`${clé}: ${valeur}`)
);
// "toto: truc"
// "bidule: 42"