JavaScript String Methods: Example of the search Function