Skip to content

Instantly share code, notes, and snippets.

@brunobord
Created March 22, 2013 16:43
Show Gist options
  • Save brunobord/5222825 to your computer and use it in GitHub Desktop.
Save brunobord/5222825 to your computer and use it in GitHub Desktop.
JS Boolean - WAT
var my_true = Boolean("true"); // == true
var my_false = Boolean("false"); // == true // WTF?
var my_question = Boolean("what's the bloody point of the Boolean() function?"); // == true // WAT
//Solution:
var ok = JSON.parse("true"); // == true
var ko = JSON.parse("false"); // == false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment