Skip to content

Instantly share code, notes, and snippets.

@omarkdev
Created March 4, 2020 21:15
Show Gist options
  • Save omarkdev/a341e480650ce13812ecf8f2bf5e5cc9 to your computer and use it in GitHub Desktop.
Save omarkdev/a341e480650ce13812ecf8f2bf5e5cc9 to your computer and use it in GitHub Desktop.
const numberExample = -1;
const stringExample = 'Awesome';
console.log(!! numberExample, !! stringExample);
console.log(Boolean(numberExample), Boolean(stringExample));
console.log(new Boolean(numberExample), new Boolean(stringExample));
// true true
// true true
// [Boolean: true] [Boolean: true]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment