Instructions
Your task is to remove all consecutive duplicate words from a string, leaving only first words entries.
For example:
In...
For further actions, you may consider blocking this person and/or reporting abuse
This one you can solve with a single RegExp:
Yeah, but backreferences are evil. ;)
Still pretty effective, especially in this case. ;)
I don't know too much about regex, I think I need to do some research about it 😅
what does the "$1" do?
It inserts the first match inside brackets.
Oh right, so it just leaves the first match and the other one gets replaced, am I rigth?
Exactly.
cool 🔥
What a conversation of genius, well donne guys !
Thanks bro 🙌
Great Solution, I didn't know that you could call the filtered array as a parameter! 🙌