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
What about using
function* entries(obj) { for (let key of Object.keys(obj)) { yield [key, obj[key]]; } } for ([key, value] of entries({a: "1", b: "2"})) { console.log(key + " " + value); }