You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2022. It is now read-only.
oatkiller edited this page Sep 13, 2010
·
3 revisions
contains returns true if the array contains the passed arguments
(function () {
[1,2,3][o.contains](1); // true. the array [1,2,3] has 1 as an element
[1,2,3,4][o.contains](0); // false, 0 isnt one of the elements of the array
[1,2,3,4][o.contains](1,2); // true. contains can take multiple params
[1,2,3,4][o.contains](0,1); // false. all params must be elements
['1',2,3][o.contains](1); // false. i always use === to compare.
})();