Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
🥷studious solution in Clear category for Convert and Aggregate by vincent.tscherter
function convAggr(data: [string, number][]): Object {
let res = {};
for(const [k,v] of data) {
if (!k || !(res[k] = (res[k]??0)+v)) delete res[k]
}
return res;
}
Dec. 5, 2022