Respuesta :

The method of the string object to search an occurrence of the specified string is search().

There are many method of the string object to search a value. These is example for that method,

  • indexOf() to give index for specified value for the first time they occur
  • lastIndexOf() to give index for specified value for the last time they occur
  • match() to give all specified value as an Array.
  • search() to search specified value and return the position of the match.

Since, the question is want to return the specified string so we can use search() method.

Learn more about indexOf() here:

brainly.com/question/20461017

#SPJ4

ACCESS MORE