Skip to content

Instantly share code, notes, and snippets.

@m3talsmith
Created March 18, 2010 15:10
Show Gist options
  • Save m3talsmith/336450 to your computer and use it in GitHub Desktop.
Save m3talsmith/336450 to your computer and use it in GitHub Desktop.
/* Array Monkey Patching */
Array.prototype.includes = function(value) {
var length = this.length;
for(var i=0; i < length; i++) {
if(this[i] == value) { return true; }
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment