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?

1
  • 1
    Maybe this question helps. Commented Nov 26, 2013 at 14:26

2 Answers 2

2

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

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

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.