valueOf() is the default method of the array object.
fruits.valueOf() will return the same as fruits
The result of v will be:
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.
![]()
The valueOf() method is supported in all major browsers.
| Type | Description |
|---|---|
| Array | The valueOf() method returns itself |
JavaScript Array Object
Your message has been sent to W3Schools.