fork download
  1. // your code goes here
  2. function sumOfTripledEvens(array) {
  3. return array
  4. .filter((num) => num % 2 === 0)
  5. .map((num) => num * 3)
  6. .reduce((acc, curr) => acc + curr);
  7. }
Success #stdin #stdout 0.04s 16352KB
stdin
sumOfTripledEvens([1,2]);
stdout
Standard output is empty