Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript objectentries

const obj = { toto: "truc", bidule: 42 };
Object.entries(obj).forEach(
  ([clé, valeur]) => console.log(`${clé}: ${valeur}`)
);
// "toto: truc"
// "bidule: 42"
 
PREVIOUS NEXT
Tagged: #javascript #objectentries
ADD COMMENT
Topic
Name
6+7 =