Frontend developer with hand-to-hand experience in AngularJs, Angular,React, and Nextjs.
Contact me
const list = ['1010111101101', '001100010001', '0101110111', '011101011', '1110111111', '00101101', '01', '1101101', '101', '0101', '010101',];
const res = list
.reduce((acc, i) => {
const sum = i.split('').reduce((a, item) => a + Number(item), 0);
return [...acc, sum];
}, [])
.join('');
Follow me on