How does a JavaScript array work?

How does a JavaScript array work?