Last active
November 28, 2018 13:27
-
-
Save Yago/5dba9209b5565fa2a8b07f4867bcdc79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sum() { | |
return [...arguments].reduce(function (acc, n) { | |
if (typeof n === 'number') return acc + n; | |
return acc; | |
}, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment