1//< ES 2017:
2
3Object.keys(obj).forEach(key => {
4 let value = obj[key];
5});
6
7//>= ES 2017:
8
9Object.entries(obj).forEach(
10 ([key, value]) => console.log(key, value);
11);
1for (let key in myDictionary) {
2 let value = myDictionary[key];
3 // Use `key` and `value`
4}
5