문제
Map, Filter, Reduce - Code Exercises | CroCoder
Map, filter and reduce are the most useful array methods to manipulate arrays and often the hardest to master. Try to solve the given exercises!
www.crocoder.dev
정답
const input = [1, -4, 12, 0, -3, 29, -150];
console.log(input.filter(x => x > 0).reduce((a, b) => a + b));