|
|
JavaScript toString() Method
JavaScript Array Object
Definition and Usage
The toString() method converts an array to a string and returns the result.
Syntax
Tips and Notes
Note: The elements in the array will be separated with commas.
Example
Example
In this example we will create an array and convert it to a string:
<script type="text/javascript">
var arr = new Array(3);
arr[0] = "Jani";
arr[1] = "Hege";
arr[2] = "Stale";
document.write(arr.toString());
</script>
|
The output of the code above will be:
Try it yourself »
|
JavaScript Array Object
The Creators of XMLSpy are Pleased to Announce
|
|
|