JavaScript Array toString() Method
The Array.toString() method is a built-in JavaScript function that converts an array into a comma-separated string. It is a simple way to represent the contents of an array as a string, with each element of the array joined by a comma. Syntax Parameters The toString() method does not take any parameters. Return Value The method…