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"
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"