Last active
August 29, 2015 14:04
-
-
Save fakefarm/872c9deb2b444e903ec3 to your computer and use it in GitHub Desktop.
Javascript Arguments act as array
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
// Arguments look like array's but are not. But you can add array functionality with prototype. | |
function Max(x,y,z) { | |
var args = Array.prototype.slice.call(arguments); | |
return args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment