S = "$answer"
S = S.replace('$answer', "'test$'")
console.log(S)
The code above outputs 'test
instead of 'test$'
as I would expect it to.
What's going on here?
S = "$answer"
S = S.replace('$answer', "'test$'")
console.log(S)
The code above outputs 'test
instead of 'test$'
as I would expect it to.
What's going on here?