A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.w3schools.com/jsref/jsref_valueof_array.asp below:

Website Navigation


JavaScript Array valueOf() Method

JavaScript Array valueOf() Examples

Get the value of fruits:

const fruits = ["Banana", "Orange", "Apple", "Mango"];
const myArray = fruits.valueOf();

Try it Yourself »

fruits.valueOf() returns the same as fruits:

const fruits = ["Banana", "Orange", "Apple", "Mango"];
const myArray = fruits;

Try it Yourself » Description

The valueOf() method returns the array itself.

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

fruits.valueOf() returns the same as fruits.

Syntax Parameters Return Value Type Description An array The valueOf() method returns itself! Browser Support

valueOf() is an ECMAScript1 (JavaScript 1997) feature.

It is supported in all browsers:

Chrome Edge Firefox Safari Opera IE Yes Yes Yes Yes Yes Yes

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4