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

Chapter 10. Arrays > Additional Array Methods

Additional Array Methods

So far we have gone over methods for adding and removing elements. Now we will go over some other array methods for manipulating elements within an array.

The toString Method

Oftentimes, you might want to set an array equal to a variable, but when you set a variable equal directly to an array, the script simply copies the array over to that variable and stores each element as its own element. We'll use the toString method, which you saw before in Chapter 9, to convert an entire array to one string, with each element separated by commas:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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