JavaScript Array valueOf() Method Last Updated : 13 Jul, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The JavaScript Array valueOf() method in JavaScript is used to return the array. It is a default method of the Array Object. This method returns all the items in the same array. It will not change the original content of the array. It does not contain any parameter values. Syntax: array.valueOf()Parameters: This method does not accept any parameter. Return Value: It returns an Array. The below examples illustrate the JavaScript Array valueOf() Method: Example 1: In this example, we will see the basic use of the Array valueOf() method. JavaScript function func() { // Original array let array = ["GFG", "Geeks", "for", "Geeks"]; // Checking for condition in array let value = array.valueOf(); console.log(value); } func(); Output[ 'GFG', 'Geeks', 'for', 'Geeks' ]Example 2: In this example, we will show the use of valueOf method. JavaScript const sub = ["DS", "Algo", "PHP", "JS", "OS"]; console.log(sub.valueOf()); Output[ 'DS', 'Algo', 'PHP', 'JS', 'OS' ]We have a complete list of Javascript Array methods, to check those please go through this Javascript Array Complete reference article. Supported Browsers: The browsers supported by JavaScript Array valueOf() Method are listed below: Google ChromeInternet ExplorerFirefoxSafariOperaWe have a Cheat Sheet on Javascript where we covered all the important topics of Javascript to check those please go through Javascript Cheat Sheet-A Basic guide to JavaScript. Comment More infoAdvertise with us Next Article JavaScript Array valueOf() Method M manaschhabra2 Follow Improve Article Tags : JavaScript Web Technologies javascript-array JavaScript-Methods Similar Reads JavaScript Array indexOf() Method The indexOf() method in JavaScript is used to find the position of the first occurrence of a specific value in an array. If the value is not present, it returns -1. This method is handy for quickly determining where a particular item is located within an array.Syntax:array.indexOf(element, start)Par 3 min read Java String valueOf() Method The valueOf() method of the String class in Java helps to convert various data types like integers, floats, booleans, and objects into their string representations. It makes it simple to work with string manipulation, logging, and displaying data efficiently.Example:To convert a number into text for 3 min read Java Guava | Doubles.indexOf(double[] array, double target) method with Examples Doubles.indexOf(double[] array, double target) method of Guava's Doubles Class accepts two parameters array and target. If the target exists within the array, the method returns the position of its first occurrence. If the target does not exist within the array, the method returns -1. Syntax: public 3 min read Java Guava | Doubles.indexOf(double[] array, double[] target) method with Examples Doubles.indexOf(double[] array, double[] target) method of Guava's Doubles Class accepts two parameters array and target. If the target exists within the array, the method returns the start position of its first occurrence. If the target does not exist within the array, the method returns -1. Syntax 3 min read Java Guava | Floats.indexOf(float[] array, float target) method with Examples Floats.indexOf(float[] array, float target) method of Guava's Floats Class accepts two parameters array and target. If the target exists within the array, the method returns the position of its first occurrence. If the target does not exist within the array, the method returns -1. Syntax: public sta 3 min read Like