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,853
  • 4
  • 18
  • 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
  • 405,095
  • 59
  • 585
  • 614
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