Curious already? Let’s see how!
You should already have your development environment setup for this course. Update your cloned repository by running the command git pull. Inside the
Beginner folder, navigate to the
searchReplace folder. Our work for this challenge will be done in here. Make sure to follow along in the
Receiving a sentence, a word in the sentence and a replacement for that word as arguments, perform a search and replace on the sentence using the arguments provided and return the new sentence. E.g
searchReplace("He is Sleeping on the couch", "Sleeping", "sitting") // should return "He is Sitting on the couch"
Note: Make sure to match the casing(capitalization) of the string to be replaced as shown above.
To the code arena!