Here you can find the source of count(obj)
Array.prototype.count = function(obj) { var count = 0;/*from w w w. j a va 2s.c o m*/ var i = this.length; while (i--) { if (this[i] === obj) { count++; } } return count; }
Array.prototype.count = function(obj) { var count = 0; var i = this.length; while (i--) { if (this[i] === obj) { count++; return count; ...