I have a string, 12345.00, and I would like it to return 12345.0.
I have looked at trim, but it looks like it is only trimming whitespace and slice which I don't see how this would work. Any suggestions?
What's a clean and efficient JavaScript implementation to strip leading and trailing spaces from a string?
For example:
" dog"
"dog "
" dog "
" dog "
all get turned into
"dog"