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

Chapter 6. Core Syntax > Array.toString()

Array.toString()

JavaScript 1.1+, ECMAScript 1.0+, JScript 3.0+ Nav3+, IE 4+ Syntax

							array.toString()

Description

The toString() method returns one string that contains all the elements in the array separated with commas. You may be wondering why anyone would need this method when the join() method can do this and more. The reason is that the toString() method is what JavaScript uses to automatically convert an array to a string when the array is used in string context.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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