You can create arrays in a few different ways. You can create them in the definition using
 brackets, such as
var arr=[1,2,3]. You can also create a new array object and add items to it using the
push() method. You can access items in the array using the
arr[index] method. The following code snippet shows an example of creating an array in each of these ways.
<script> var weekdays = ["Mon", "Tue", "Wed", "thur", "Fri"]; var weekend = new Array(); weekend.push("Sat"); weekend.push("Sun"); document.write(weekdays.toString() ...