Easy Tutorial
❮ Prop Style Unicodebidi Dom Obj Title ❯

JavaScript toString() Method

JavaScript Array Object

Example

Convert an array to a string:

fruits will output:


Definition and Usage

The toString() method converts an array into a string and returns the result.

Note: Elements in the array are separated by commas.


Browser Support

All major browsers support toString().


Syntax

Return Value

Type Description
String All values of the array separated by commas

Technical Details

| JavaScript Version: | 1.1 | | --- | --- |


JavaScript Array Object

❮ Prop Style Unicodebidi Dom Obj Title ❯