Demo: Array Searching

The following list represents an array; the element whose index is found by calling dojo/_base/array.indexOf(array, 2); is highlighted.

The following list represents an array; the element whose index is found by calling dojo/_base/array.indexOf(array, 2, 2); is highlighted.

The following list represents an array; the element whose index is found by calling dojo/_base/array.lastIndexOf(array, 2); is highlighted.

The following list represents an array; the element whose index is found by calling dojo/_base/array.indexOf(array, object); is highlighted.