Skip to content

Instantly share code, notes, and snippets.

@joepie91

joepie91/.js

Last active Jul 9, 2017
Embed
What would you like to do?
Boolean casting in Node.js
> !!(false)
false
> !!(0)
false
> !!("")
false
> !!(null)
false
> !!(undefined)
false
> !!("0")
true
> !!("test")
true
> !!(-1)
true
> !!(true)
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.