Here you can find the source of indexOf(what, i)
Array.prototype.indexOf = function(what, i) { i = i || 0;// w w w . j a va 2 s .c om var L = this.length; while (i < L) { if(this[i] === what) return i; ++i; } return -1; };
Array.prototype.indexOf = function(val) { for (let i = 0; i < this.length; i++) { if (this[i] == val) return i; return -1; };
Array.prototype.indexOf = function(value) { for (var i = 0; i < this.length; i++) { if (this[i] == value) { return index = i; return -1; };
Array.prototype.indexOf = function(value) { for (var i = 0; i < this.length; i++) { if (this[i] === value) { return i;
Array.prototype.indexOf = function (value) { for(var i=0; i<this.length; i++) { if(this[i] === value) { return i; return -1;
Array.prototype.indexOf = function(value, begin, strict) for(var i = +begin || 0; i < this.length; i++) if(this[i] === value || strict && this[i] == value) return i; return -1; };
Array.prototype.index = function(val) { for(var i = 0, l = this.length; i < l; i++) { if(this[i] == val) return i; return null; };
"use strict"; Array.prototype.index = function(val) { for(var i = 0, l = this.length; i < l; i++) { if(this[i] == val) return i; return null; };
Array.prototype.indexOfAttr = function (attr, value) { for(var i = 0; i < this.length; i += 1) { if(this[i][attr] === value) { return i; return -1; };
Array.prototype.indexOfByFunction = function (filter) { return indexOfByFunction(this, filter); };