replace() for JavaScript str.endsWith("$")
I encountered a problem in project development I need to use regular expressions, replace, and template strings to process a string. I found a strange problem, but I couldn't explain it myself. I made a simple demo and you can…