Skip to content

Instantly share code, notes, and snippets.

@paulanthonywilson
Created August 18, 2011 09:16
Show Gist options
  • Save paulanthonywilson/1153714 to your computer and use it in GitHub Desktop.
Save paulanthonywilson/1153714 to your computer and use it in GitHub Desktop.
Stringy
"hello" === "hello #true
String("hello") === "hello" #true
new String("hello") === "hello" #false
new String("hello") == "hello" #true
@froots
Copy link

froots commented Aug 18, 2011

typeof String("hello") // "string"
typeof new String("hello") // "object"

Another reason to only ever use literals...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment