Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
🗃️ Reduce solution in Clear category for Sum by Type by zborde
var sumByTypes=(v: Array): [string, number] =>
v.reduce( (a, x) => ( typeof x === 'string' )? [ a[0]+x, a[1] ]: [ a[0], a[1]+x ] ,['', 0] );
May 15, 2020
Comments: