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

Showing All Elements

Finally, let's look at a quick and simple way to list the values of all the elements in an array. This is done by simply using the name of the array. Therefore, to return all the elements of days_of_week and place them in an alert box, you can use the following (see Figure 5.6 for output):

Figure 5.6. Alert box displaying the values for all the elements in the array days_of_week.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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