I like this but I will do it without /g as you will encounter this replacement at the most once. Also space after $ maybe present or may not be so /\$?\s?/ would do I guess. What do you think?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is my solution in javascript:
A more readable version:
My solution in Typescript
I like this but I will do it without /g as you will encounter this replacement at the most once. Also space after $ maybe present or may not be so
/\$?\s?/
would do I guess. What do you think?