Skip to content

Instantly share code, notes, and snippets.

@hcarvalhoalves
Last active December 10, 2015 17:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hcarvalhoalves/4471029 to your computer and use it in GitHub Desktop.
Save hcarvalhoalves/4471029 to your computer and use it in GitHub Desktop.
var a = [20, 10, 5, 1];
// Everyday array
a.sort();
// [1, 10, 20, 5]... WTF?
a == [1, 10, 20, 5];
// false
a === [1, 10, 20, 5];
// also false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment