DEV Community

Discussion on: Coercion in JavaScript

Collapse
 
godcrampy profile image
Sahil Bondre

Yea, "+" followed by any data type coerces it into Number data type. Also, using "-" followed by the data type coerces it to the negative of the Number. Point to note is that this does'nt work with other operators like *, /, %.

Thank you for letting me know about this feature! Learnt something new today 😄.