lastIndexOf
Look for an item in a DefineList starting from the end.
list.lastIndexOf(item)
lastIndexOf finds the last position of a given item in the DefineList.
var list = new DefineList(['Alice', 'Bob', 'Alice', 'Eve']);
list.lastIndexOf('Alice'); // 2
list.lastIndexOf('Charlie'); // -1
Parameters
- item
{*}:The item to find.
Returns
{Number}:
The position of the item in the DefineList, or -1 if the item is not found.