Created
January 15, 2013 05:25
-
-
Save nenjiru/4536363 to your computer and use it in GitHub Desktop.
Array extension
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
/* | |
* Array clone | |
*/ | |
Array.prototype.clone = function() | |
{ | |
return this.concat([]); | |
} | |
/* | |
* Max value (only number | |
*/ | |
Array.prototype.max = function() { | |
return Math.max.apply(null, this); | |
} | |
/* | |
* Min value (only number | |
*/ | |
Array.prototype.min = function() { | |
return Math.min.apply(null, this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment