indexOf
can.List.prototype.indexOf
Look for an item in a List.
list.indexOf(item)
indexOf
finds the position of a given item in the List.
Parameters
-
item
{*}
the item to find
Returns
{Number}
the position of the item in the List, or -1 if the item is not found.
It is trivial to make a
contains
-type function usingindexOf
: