JavaScript Array toString()
Example
Convert an array to a string:
const fruits = ["Banana", "Orange", "Apple", "Mango"];
let text = fruits.toString();
Try it Yourself »
Definition and Usage
The toString() method returns a string with all array values separated by commas.
toString() does not change the original array.
Browser Support
toString() is fully supported in all browsers:
| Chrome | IE | Edge | Firefox | Safari | Opera |
| Yes | Yes | Yes | Yes | Yes | Yes |
Syntax
array.toString()
Parameters
| None |
Technical Details
| Return Value: | A String, representing the values of the array, separated by a comma |
|---|---|
| JavaScript Version: | ECMAScript 1 |

