Skip to content

Instantly share code, notes, and snippets.

@vortizhe
Created July 18, 2013 13:45
Show Gist options
  • Save vortizhe/6029419 to your computer and use it in GitHub Desktop.
Save vortizhe/6029419 to your computer and use it in GitHub Desktop.
include array prototype
if ( !Array.prototype.include ) {
Array.prototype.include = function(element) {
for(var i = 0, len = this.length; i < len; ++i) {
if (this[i] == element) { return true; }
}
return false;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment