Comment by ayhanfuat
2 years ago
> In js I thought 1==true, and 1 is shorter than !0 ??
`1==true` but `1!==true` (`===` and `!==` check for type equality as well and while `!0` is a boolean, `1` is not.
2 years ago
> In js I thought 1==true, and 1 is shorter than !0 ??
`1==true` but `1!==true` (`===` and `!==` check for type equality as well and while `!0` is a boolean, `1` is not.
No comments yet
Contribute on Hacker News ↗