Clarification of casing in "Search and Replace" algorithm challenge

In the challenge it says:

Preserve the case of the original word when you are replacing it. For example if you mean to replace the word “Book” with the word “dog”, it should be replaced as “Dog”

Does this ask to be mindful of the casing of the first letter of the word being replaced, or to be mindful of the casing of any letters in the world being replaced? For example, if the word “bOok” were to be replaced with “dog”, it would have to be mindful of the second letter casing, making it “dOg”.

Only the first letters are capitalized. Don’t worry about uppercase letters in the middle of a word for this challenge.

1 Like