Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
.filter solution in Clear category for Sum by Type by alexerisov
function sumByTypes(arr) {
return [
arr.filter(el => typeof el === 'string').join(''),
arr.filter(el => typeof el=== 'number').reduce((a,b) => a + b, 0),
];
}
July 9, 2020
Comments: