Question: 5. Assume courseTitle =Principles in Information Technology and Computation; What does the following JavaScript statement do? var something = courseTitle.search('o'); It finds all o's and
5.
Assume courseTitle ="Principles in Information Technology and Computation";
What does the following JavaScript statement do?
var something = courseTitle.search('o');
| It finds all o's and save them to variable something. | ||||||||||||||||||||||||||||||||||||||
| It saves the position of the first occurrence of "o" to variable something. | ||||||||||||||||||||||||||||||||||||||
| It saves the position of the last occurrence of "o" to variable something. | ||||||||||||||||||||||||||||||||||||||
| It will save a true or false to something depends on whether there is an 'o' in courseTitle. 6. Assume phrase= "Peter Piper picked a peck of pickled peppers", What will be returned if phrase.search(/[aeiou]/) is called?
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
