Skip to content

Instantly share code, notes, and snippets.

@TimothyFitz
Created March 21, 2015 22:05
Show Gist options
  • Save TimothyFitz/900454173d1bf085f59a to your computer and use it in GitHub Desktop.
Save TimothyFitz/900454173d1bf085f59a to your computer and use it in GitHub Desktop.
class Foo extends Array {}
var a = new Array();
a[0] = "bar";
console.log(a.length); // 1
var f = new Foo();
f[0] = "bar";
console.log(f.length); // 0, when I expect this to be 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment