JavaScript arrays are written with square brackets. Array items are separated by commas. Array indexes are zero-based, which means the first item is [0], second is [1], and so on. The following code declares (creates) an array called cars, containing three items (car names) and the browser will display the first item [0]:
var cars = ["Saab", "Volvo", "BMW"];