208k views
2 votes
Assume phrase= "Peter Piper picked a peck of pickled peppers", What will be returned if phrase.search(/[aeiou]/) is called?

1

7

9

13

1 Answer

0 votes

Answer:

The answer to this question is 1.

Step-by-step explanation:

In the code provided in the question we have a string phrase having some content in it.Now we are using to search which return the position of first occurrence of the item searched for.Since we are using a regular expression.Which means that it will search any character from a,e,i,o,u.If any character from a,e,i,o,u is found it will return the position of that character.

User Ibrahim Hammed
by
5.1k points