Returns a string representation of an array.
SyntaxtoString()
Return Value
The string representation of the array.
ExamplesThe following example illustrates the use of the toString method with an array.
var arr = [1, 2, 3, 4];
var s = arr.toString();
document.write(s);
Remarks
The elements of an Array are converted to strings. The resulting strings are concatenated and separated by commas.
See also Specification15.4.4.2 Array.prototype.toString ( ) ECMAScript® Language Specification Standard ECMA-262 5.1 Edition / June 2011
AttributionsMicrosoft Developer Network: Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4