• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Arrays > Arrays and Array Elements

9.1. Arrays and Array Elements

An array is a data type that contains or stores numbered values. Each numbered value is called an element of the array, and the number assigned to an element is called its index. Because JavaScript is an untyped language, an element of an array may be of any type, and different elements of the same array may be of different types. Array elements may even contain other arrays, which allows you to create data structures that are arrays of arrays.

9.1.1. Creating Arrays

In JavaScript 1.1 and later, arrays are created with the Array( ) constructor and the new operator. You can invoke the Array( ) constructor in three distinct ways.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint