This site has some useful info.
JavaScript is very relaxed about the difference between strings and numbers.
...
So if you use + on a string and a number, JavaScript is going to make
the number a string for you. Better still, if you need it you can
treat numbers as strings or strings as numbers.
Conversely, if you apply mathematics to a string, JavaScript tries to
make it a number. If the string cannot be interpreted as a number
(because there are letters in it, for instance), JavaScript gives NaN
(Not a Number).