15.2.5 Displaying the contents of arrays The easiest way to display the contents of an array is to simply use the document.write() function. This function, when given an array name as an argument, will display each element of the array on the same line, separated by commas. For example, the code var weekDays = new Array "Monday, "Tuesday, "Wednesday, "Thursday, Friday, "Saturday, "Sunday document.write( "Weekdays" + weekDays); Produces the following output in a browser 15.2.6 Array length The term length, rather than size, is used to refer to the number of elements in array. The reason for this will become clear shortly. As illustrated in the VERSION 1 code above, the size of an array can be specified when an array is declared var weekDays = new Array