Created
March 4, 2020 21:15
-
-
Save omarkdev/8e8a7a59e7aaa91da10509d1047024cc to your computer and use it in GitHub Desktop.
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
const firstWay = !! 'secret'; | |
const secondWay = Boolean('secret'); | |
const thirdWay = new Boolean('secret'); | |
console.log(firstWay === true); | |
console.log(secondWay === true); | |
console.log(thirdWay === true); | |
// true | |
// true | |
// false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment