Hacker News new | ask | show | jobs
by ivanjermakov 396 days ago
Distinction is tricky since you can use indexing on plain objects, e.g.

    const foo = {};
    foo[0] = "bar";
1 comments

Right. For the purposes of standard library functions that operate on array-like objects,

  { length: 1, 0: "item" }
is an array.