Introduction to Coercion in Javascript
How many times have you wondered why 1 + "1" = "11" but 1 - "1" = 0 in Javascript?
How many times have you labeled Javascript as "weird" or "difficult"?
I suppose too many.
Let's demystify this.
This confusion mainly occurs because developers have an...
omkarterbhai.com6 min read