Iterating an object has meant Object.keys() and an index lookup, which names the key twice and reads badly next to the array methods it sits beside.
// before
Object.keys(rates).forEach(country => {
console.log(country, rates[country]);
});
// now
Object.entries(rates).forEach(([country, rate]) => {
console.log(country, rate);
});
Object.values(rates).reduce((a, b) => a + b, 0);
Both return own enumerable properties only, so inherited members and anything defined with Object.defineProperty without enumerable are excluded — which is usually what you want and is worth knowing when a property mysteriously does not appear. Object.entries also converts cleanly into a Map, which is the shortest way to get an ordered, object-keyed lookup.