Skip to content

Instantly share code, notes, and snippets.

@eligrey
Created September 19, 2009 20:50
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 eligrey/189580 to your computer and use it in GitHub Desktop.
Save eligrey/189580 to your computer and use it in GitHub Desktop.
Object.prototype.foo = "bar";
Object.prototype.bar = "foo";
var test = {a: 1, b: 2, c: 3},
props = [], vals = [];
for (let prop in test) {
props.push(prop);
}
for each (let val in test) {
vals.push(val);
}
props.join(", ") === "a, b, c" && vals.join(", ") === "1, 2, 3";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment