Skip to content

Instantly share code, notes, and snippets.

@tgittos
Created April 4, 2017 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgittos/109ee0f7aba76063de7407800e3cf000 to your computer and use it in GitHub Desktop.
Save tgittos/109ee0f7aba76063de7407800e3cf000 to your computer and use it in GitHub Desktop.
Why I hate Javascript
// Dumb date handling across browsers
// Chrome:
new Date('2017-4-3')
// Mon Apr 03 2017 00:00:00 GMT-0500 (CDT)
// Firefox
new Date('2017-4-3')
// Date 2017-04-03T00:00:00.000Z
// Dumb type handling
typeof "foo"
// "string"
foo instanceof string
/* VM3913:1 Uncaught ReferenceError: string is not defined
at <anonymous>:1:16
(anonymous) @ VM3913:1 */
foo instanceof String
//false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment