Created
March 4, 2020 21:14
-
-
Save omarkdev/9320de1f0e1c50f4ae29c159d560475d 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 = !! 'works'; | |
const secondWay = Boolean('works'); | |
const thirdWay = new Boolean('works'); | |
if (firstWay == true) { | |
console.log('First way really works!'); | |
} | |
if (secondWay == true) { | |
console.log('Second way really works!'); | |
} | |
if (thirdWay == true) { | |
console.log('Third way really works!'); | |
} | |
// First way really works! | |
// Second way really works! | |
// Third way really works! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment