Demo: Array Searching

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

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

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

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