1

I mean, apart from the [].prototype methods and the strictly-"stringmeric" keys?

Anything?

Could an array said to be an object that by convention has exclusively "numeric" string values as keys, and inherits methods from Array.prototype?

Are there any other differences?

user3025492
  • 2,533
  • 4
  • 17
  • 19
  • 1
    Maybe [this question](http://stackoverflow.com/questions/874205/what-is-the-difference-between-an-array-and-an-object) helps. – Sascha Wolf Nov 26 '13 at 14:26

2 Answers2

2

The key difference is the automatic behavior of the .length property.

Here is a slightly old but still interesting article on the topic.

Pointy
  • 389,373
  • 58
  • 564
  • 602
1

You get the Array prototype such as

$ ['foo', 'bar'].length
2

$ ['foo', 'bar'].join('|')
'foo|bar'

// etc...

Read more about it here:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype

Dauh Fhauc
  • 141
  • 11