The proper way to use the ECMAScript 2015 deconstruction suggested here is:
for (let [key, value] of Object.entries(object1)) { console.log(`${key}: ${value}`); }
No comments:
Post a Comment