Ad
Code
Diff
  • const getIDS = n => [...n].reduce((r, x) => r + Number(x), 0);
    • const getIDS = n => [...n].reduce((r, x) => r + +x, 0);
    • const getIDS = n => [...n].reduce((r, x) => r + Number(x), 0);