Use === Instead of ==
Learn the difference between the === and == operators.
Many JavaScript programmers often repeat the mistake of comparing using ==
, which is the type-coercion non-strict equality operator.
Example of ==
operator
Let’s look at an example that shows why using ==
may be a bad idea.
Get hands-on with 1400+ tech skills courses.