Skip to content

underblob

<アンダブロッブ />

Better Object Traversal in Javascript

ES6 introduced Object.entries and destructuring and template strings:

for (let [key, val] of Object.entries(myObjectPrimitive)) {
  console.log(`myObjectPrimitive[${key}]: ${val}`);
}
Author underblobPosted on 2017.01.172017.01.17Categories TechTags code, ES6, Javascript

Post navigation

Previous Previous post: SSH Car Key
Next Next post: Hex
underblob Proudly powered by WordPress