Javascript examples for Array:valueOf
The valueOf() method returns the itself.
None
An Array. The valueOf() method returns itself
?fruits.valueOf() will return the same as fruits
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w w w . j av a2 s. c o m*/ var fruits = ["a","b","c","d","e"]; document.getElementById("demo").innerHTML = fruits.valueOf(); } </script> </body> </html>