Skip to content

Instantly share code, notes, and snippets.

@Valid
Created August 21, 2010 21:35
Show Gist options
  • Save Valid/542884 to your computer and use it in GitHub Desktop.
Save Valid/542884 to your computer and use it in GitHub Desktop.
Node repl:
node> var object = {"2":"first","1":"second","3":"third"}
node> console.log(object)
{ '1': 'second', '2': 'first', '3': 'third' }
node>
Firebug console:
var object = {"2":"first","1":"second","3":"third"}
console.log(object);
Response:
Object { 2="first", 1="second", 3="third"}
Node sorts the object (2, 1, 3 becomes 1, 2, 3) instead of returning it as input.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment