JavaScript Developer — Medium
Key points
- The unary plus operator converts non-number values to numbers
- '3' is converted to 3, true is converted to 1, null is converted to 0
- Undefined cannot be converted to a number, resulting in NaN
Ready to go further?
Related questions
