Animations
API
Arrays
Async
Basics
Challenges
Classes
Console
Dates
Debugging
DOM Elements
DOM Methods
DOM Properties
Event Listeners
Flow Control
Forms
Functions
Global Functions
JSON
Keywords
Libraries (3rd party)
Math
Modules
Objects
Snippets
String
Types
Widgets
Window Object
https://www.w3schools.com/jsref/jsref_obj_array.asp
The valueOf() method is the default behavior for an array. It converts an array to a primitive value. JavaScript will automatically convert an array to a string when a primitive value is expected. Because of this, all these examples will produce the same result.
let fruits = ["Banana", "Orange", "Apple", "Mango"];
document.getElementById("demo").innerHTML = fruits;
let fruits2 = ["Banana", "Orange", "Apple", "Mango"];
document.getElementById("demo2").innerHTML = fruits2.valueOf();
let fruits3 = ["Banana", "Orange", "Apple", "Mango"];
document.getElementById("demo3").innerHTML = fruits3.toString();