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
Share this Page URL
Help

Chapter 11. Arrays > Determining the Size of an Array

11.5. Determining the Size of an Array

All arrays come with an instance variable named length, which indicates the current number of elements in the array (including undefined elements). To access an array's length variable, we use the dot operator, like so:

theArray.length


  

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