Type coercion is the implicit process of converting values from one type to another (such as string to number, object to boolean, and so on).
Coercion in computation
-
, *
, /
, %
- Operators that automatically converts to number
The addition sign is different on all these operators because it will prioritize concatenating strings rather than converting to number.
Coercion in conditional statements
Type coercion also happens when checking for truthy or falsy values.