Object.fromEntriesintermediate// Build an object from [key, value] pairs
const entries = [['a', 1], ['b', 2]]
Object.fromEntries(entries) // β { a: 1, b: 2 }Use Object.fromEntries() to convert an iterable of [key, value] pairs into a plain object.
Combining Object.entries, .map, and Object.fromEntries is a powerful pattern to transform object values.
Challenge: Implement doubleValues(obj) that returns a new object with all numeric values doubled.
doubleValues({ a: 1, b: 3 }) // β { a: 2, b: 6 }