Also, we can use the replace() method to search and replace occurrences of a string within a string.

Let's change this generic greeting and make it greet you!

See that? replace() searches for the value we give it and, in return, gives us a string within which the occurrences are replaced.

Remember, we are trying to replace the string here.