English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript Array valueOf() Method

 JavaScript Array Object

valueOf()The method returns the original value of the specified object. This is the default method of the array object, which belongs to the Object object. Since all objects 'inherit' the object instance of Object, almost all instance objects can use this method.

Note:valueOf()The method does not change the original array.

Syntax:

array.valueOf()
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May'];
months.valueOf();
Test and see‹/›

Browser Compatibility

All browsers fully support the valueOf() method:

Method
valueOf()YesYesYesYesYes

Technical Details

Return value:Specify the original value of the array
JavaScript Version:ECMAScript 1

 JavaScript Array Object