Solution5 bug report and needs updating

Tell us what’s happening:

Hi! As I like to test and understand the logic of every solutons, I have bumped into this bug here and would like report please.

The solution 5 has a bug and it won’t pass the situation when the before starts with a lowercase character but the after with a uppercase character.

The 5th line of the solution code needs to be changed to the following to mannualy replace the first uppercase character of before to be a lowercase character:

? => (item === before ? after[0].toLowerCase() + after.slice(1) : item)).join(" ")

Stay safe all!

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 Edg/98.0.1108.62

Challenge: Search and Replace

Link to the challenge:

Updated - thanks for the bug report!