JavaScript Array valueOf() Method
Clash Royale CLAN TAG#URR8PPP
googletag.cmd.push(function() googletag.display('div-gpt-ad-1422003450156-2'); );
JavaScript Array valueOf() Method
❮ JavaScript Array Reference
Example
valueOf() is the default method of the array object.
var fruits = ["Banana", "Orange", "Apple", "Mango"];
var v = fruits.valueOf();
fruits.valueOf() will return the same as fruits
<!--
The result of v will be:
Banana,Orange,Apple,Mango
-->Try it Yourself »
Definition and Usage
The valueOf() method returns the array.
This method is the default method of the array object. Array.valueOf()
will return the same as Array
Note: This method will not change the original array.
Browser Support
The numbers in the table specify the first browser version that fully supports the method.
Method | |||||
---|---|---|---|---|---|
valueOf() | Yes | Yes | Yes | Yes | Yes |
Syntax
array.valueOf()
Parameters
None |
Technical Details
Return Value: | An Array. The valueOf() method returns itself |
---|---|
JavaScript Version: | ECMAScript 1 |
❮ JavaScript Array Reference