An array is a special variable, which can hold more than one value:
It is a common practice to declare arrays with the const keyword.
There is no need to use new Array().
For simplicity, readability and execution speed, use the array literal method.
The JavaScript method toString() converts an array to a string of (comma separated) array values.
Arrays are a special type of objects. The typeof operator in JavaScript returns "object" for arrays.
But, JavaScript arrays are best described as arrays.
JavaScript variables can be objects. Arrays are special kinds of objects.
Because of this, you can have variables of different types in the same Array.
Many programming languages support arrays with named indexes.
Arrays with named indexes are called associative arrays (or hashes).
JavaScript does not support arrays with named indexes.
In JavaScript, arrays always use numbered indexes.
Array in javascript example