Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js entries

const object1 = { a: 'somestring', b: 42 };
for (const [key, value] of Object.entries(object1)) {
  console.log(`${key}: ${value}`);
} // expected output: "a: somestring" "b: 42" order is not guaranteed
 
PREVIOUS NEXT
Tagged: #js #entries
ADD COMMENT
Topic
Name
8+5 =