[Solved] Is there a JavaScript proposal for an operator to apply a function to every item in a collection?


You could take a combination of

var object = { a: 1, b: 2 },
    result = Object.assign(...Object.entries(object).map(([k, v]) => ({ [k]: v * 2 })));

console.log(result);

3

solved Is there a JavaScript proposal for an operator to apply a function to every item in a collection?