Description
The valueOf() method is used to return an array.
This method has the form:
array.valueOf()
Note: This method does not change the original array.
Return Value
An Array containing all the values of the array (i.e. itself)
Examples
The following example shows the basic use of this method.
<script>
var colorNames = ['Red', 'Green', 'Blue'];
document.write(colorNames.valueOf());
</script>
This produces the following result:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|