Here you can find the source of contains(obj)
/**//w ww . j av a 2 s .co m * @file Defines extra functions for the Array object not defined by Rhino. NOT STANDARD ECMASCRIPT!!! * @author Tribex */ /** * Check if an array contains a value. * @param obj {object} The value to search the array for. * @returns {boolean} true if found, false if not. */ Array.prototype.contains = function(obj) { var i = this.length; //Supposedly the fastest way to iterate in JavaScript. May not be true for Rhino. while (i--) { if (this[i] == obj) { return true; } } return false; }
'use strict'; const list = require('./list.json'); const items = []; const duplicates = []; Array.prototype.contains = function(obj) { let i = this.length; while (i--) { if (this[i] == obj) { return true; ...
Array.prototype.contains = function(obj) { let i = this.length; while (i--) { if (this[i] == obj) { return true; return false;
Array.prototype.contains = function(obj){ return this.indexOf(obj)>-1; };
Array.prototype.contains = function(obj) { var i = this.length; while (i--) { if (this[i] === obj) { return true; return false; }; ...
Array.prototype.contains = function (obj) { return this.indexOf(obj) >= 0; };
Array.prototype.contains = function (obj) { var i = this.length; while (i--) { if (this[i] === obj) { return true; return false;
Array.prototype.contains = function(obj) { var i = this.length; while (i--) { if (this[i] === obj) { return true; return false; }; ...
Array.prototype.contains=function(obj) { var index=this.length; while (index--){ if(this[index]===obj){ return true; return false;
Array.prototype.contains = function(obj) { var i = this.length; while (i--) { if (this[i] === obj) { return true; return false; if (!String.prototype.startsWith) { String.prototype.startsWith = function(searchString, position) { position = position || 0; return this.indexOf(searchString, position) === position; }; String.prototype.arrayfy = function(n) { arr = this.split(' '); return arr.slice(0,n); window.required = []; window.require = function(script, callback) { if(!required.contains(script)) $.get(script + ".js", function(data){ required.push(script); eval(data); if(callback != null) callback(); });