Hence the split method returns every word as an array element. JavaScript. . In javascript, we have a built-in method which is common for all the objects toString() to convert the object to the string datatype. JavaScript reference. This toString() method of an object is overridden by Array to convert the array object to string data type. It also converts an Array to String and allows to specify separator. Converting a JavaScript array into a string by using the toString() method. Here, we will discuss five methods in javascript which help to convert array to a string in detail. Whenever we add an array to a string by using plus operator javascript internally converts the objects which are being concatenated to string format. Sometimes required to convert an Array to string format for displaying on the page, send to AJAX request, or further processing. The output of the above code, after clicking on the “Display Language String” button is as follows. Using String split() Function: The str.split() function is used to split the given string into array of strings by separating it into substrings using a specified separator provided in the argument. Today, let us look at how to do the opposite: convert a string back to an array. This is a guide to Javascript Array to String. JavaScript Demo: Array.toString () const array1 = [1, 2, 'a', '1a']; console.log (array1.toString ()); // expected output: "1,2,a,1a".