concept indexOf in category javascript
appears as: indexOf

This is an excerpt from Manning's book Prototype and Scriptaculous in Action.
The indexOf() method accepts an object as an argument and returns the numerical index of the first occurrence of that object in the Array. If the Array doesn’t contain the object, it returns –1. (The return codes are borrowed from the JavaScript String, which has a built-in indexOf() method. In snippet 10.13, we interrogate our list of clouds using indexOf().