== converts the operands to the same type before checking for quality.
== checks only for same value.Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 == false // true | |
2 == "2" // true | |
null == undefined // true |
=== does not converts the operands to the same type before checking for quality.
=== checks for same value + same type. Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 === false // false | |
2 === "2" // false | |
null === undefined // false | |
Link of Examples
== Comparison Operator
=== Comparison Operator
No comments:
Post a Comment