Skip to content

Instantly share code, notes, and snippets.

@zeusdeux
Created May 12, 2014 15:24
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 zeusdeux/f3a7c20222c6c404b798 to your computer and use it in GitHub Desktop.
Save zeusdeux/f3a7c20222c6c404b798 to your computer and use it in GitHub Desktop.
Things I see in production code
//not sending hex values as strings to parseInt/Float
//This is not equal to parseInt("0xff", 16)
//It's actually equal to parseInt(255, 16)
parseInt(0xff, 16);
//coercing to string and the parsing back (WHY?! T_T)
var val = 10+"";
fn(parseInt(val,10));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment