DEV Community

loading...

Discussion on: Javascript Coercions (Conversions)

Collapse
khattakdev profile image
Arsalan Khattak Author

Here's how it works

[] == ![]
0 == 0   // (Number([]) and Number(![]) both are equal to 0)
Enter fullscreen mode Exit fullscreen mode

Once both are 0,
Double Equals
And strict equality is pretty straight forward, if the values and types are the same, returns true