Javascript - Array valueOf() Method

The valueOf() method returns the array.

Description

The valueOf() method returns the array.

Syntax

array.valueOf()

Parameters

None

Return

An Array. The valueOf() method returns itself

Example

valueOf() is the default method of the array object.

myArray.valueOf() will return the same as myArray

Demo

var myArray = ["XML", "Json", "Database", "Mango"];
console.log( myArray.valueOf() );

Result