Why triple equal signs is preferred in JS?
=== is preferred over this sign
== is an Abstract Comparison while
=== is a Strict Comparison.
Abstract Comparison will attempt to convert its argument to a common type before comparison while Strict Comparison uses the obvious semantics which is a value (or any value) is only equal to itself. *There is a slightly different semantics used in numbers. But in most cases, a value is only equal to itself; number
2 is not equal to string
=== sign is preferred over the usual equality sign because of its strict comparison, hence the name.