0

Please explain this code

function magic(...nums) { let sum=0; nums.filter(n=>n%2==0).map(el=>sum+=el); return sum; } console.log(magic(1,2,3,4,5,6)); Output:12

10th May 2019, 5:42 PM
Rucha
Rucha - avatar
2 Respuestas
0
What is el=> in that
12th May 2019, 12:24 PM
Rucha
Rucha - avatar