Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Arrays

Arrays are a powerful mainstay of any programming language. Unlike strings and numbers, which represent only a single value, arrays can store lists of values, even of different types. Because an array contains multiple values (or elements), they use a different syntax to add and retrieve any individual value. Whereas a variable like fullName might represent a single string, the array variable team might represent a dozen strings at once (i.e., the names of the people on the team).

An array can be created by making a new object of type Array:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial