JavaScript Array Type

Creation

We can create new array instances by separating normal JavaScript types with commas and wrapping all of the elements in square brackets. The elements of the array can be of any type and we can mix and match to our hearts content.

Though we do recommend creating lists where the elements are of the same type because it can be a lot of hassle working with lists with many different types. Working with arrays is much simpler when we use functional programming principles and it's much easier to write functions that handle one specific type instead of many different types.

const characters = [
"Vin", "Sazed", "Elend", "Lestibournes"
]