JavaScript Type Conversion & Coercion
Jan 22, 2022 · 4 min read · 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...
Join discussion

