Ad
  • Custom User Avatar

    Voting clever, because it is. Definitely not best practice: spec-wise, the order of keys in an object is undefined, so it's only by chance that V8's Object.keys happens to return the keys in order of definition. I love the hack, just want to point that out so that people don't rely on this for "actual" code.