Skip to content

Instantly share code, notes, and snippets.

@noscripter
Last active August 14, 2018 14:21
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 noscripter/f942efac14990d3bcc3bc66a1780bd6f to your computer and use it in GitHub Desktop.
Save noscripter/f942efac14990d3bcc3bc66a1780bd6f to your computer and use it in GitHub Desktop.

stupid type which lead to errors in JavaScript

  • localStorage.setItem('redirect', true)
    • localStorage.getItem('redirect') => 'true'(String)
  • var m = new Map()
    • m.set('1', 1) and m.set(1, 1) set two different values for m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment