Why isn\'t is possible to use objects in for of loops? Or is this a browser bug? This code doesn\'t work in Chrome 42, saying undefined is not a function:
te
Using Array Destruction you can iterate it as follows using forEach
forEach
const obj = { a: 5, b: 7, c: 9 }; Object.entries(obj).forEach(([key, value]) => { console.log(`${key} ${value}`); // "a 5", "b 7", "c 9" });