Mais um arquivo agora em markdown :P
Last active
August 29, 2015 14:09
-
-
Save rands0n/51b8ef259fc0429dd217 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
// More info: http://dzone.com/snippets/arrayprototypesummaxmin | |
Array.prototype.max = function() { return Math.max.apply({}, this); } | |
Array.prototype.min = function() { return Math.min.apply({}, this); } | |
Array.prototype.sum = function() { | |
for(var i = 0, sum = 0; i < this.length; sum += this[i++]); | |
return this; | |
} |
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
var Person = {} || ''; | |
Person.name = function(name) { | |
return this.name; | |
} | |
Person.set_name = function(name) { | |
this.name = name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment