Last active
March 13, 2023 14:29
-
-
Save periakteon/7c1c9ecaed5628b9cdc93944df1c2c04 to your computer and use it in GitHub Desktop.
FreeCodeCamp: Comparison with Equality Operator
This file contains hidden or 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
| function testEqual(val) { | |
| if (val == 12) { | |
| return "Equal"; | |
| } | |
| return "Not Equal"; | |
| } | |
| console.log(testEqual(12)); | |
| //Equal | |
| console.log(testEqual('12')); | |
| //Equal | |
| console.log(testEqual(10)); | |
| //Not Equal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment