Skip to content

Instantly share code, notes, and snippets.

@omarkdev
Created March 4, 2020 21:14
const firstWay = !! 'secret';
const secondWay = Boolean('secret');
const thirdWay = new Boolean('secret');
console.log(typeof firstWay);
console.log(typeof secondWay);
console.log(typeof thirdWay);
// boolean
// boolean
// object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment