Last active
September 12, 2018 11:16
-
-
Save manekinekko/d7262c5379f1b9ddded1b7d645b38b6a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 max() { | |
return (arguments.length === 0) ? 0 : Math.max.apply(Math, arguments); | |
} | |
max(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); //=> 9 | |
max(3, 8, 32, 2, 98); //=> 98 | |
max(42, 0); //=> 42 | |
max(); //=> 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment