0

I was given a text. How can I search for a particular string in that and how many times it appears using JavaScript?

Text:

This is a boy . This boy is very smart . This boy does miracles.

So if I want search for string = "boy " .

How can I do that using JavaScript?

What I did ? I tried using search function of JavaScript. Is that right to use?

Thank you so much in advance!!!

5

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.