JavaScript Type Conversion & Coercion
JavaScript can be confusing sometimes and one of the biggest sources of confusion is type conversion and coercion in JavaScript.
Here is an example:
'5' + '3'
-> '53'
'5' - '3'
-> 2
Why the hell is '5' + '3' = '53' but '5' - '3' = 2? Coercion is the...
mboehm.hashnode.dev4 min read