I know you can do this through looping through elements of array and concatenating. But I\'m looking for one-liner solutions. toString() and join() returns string with eleme
Use the Array.join() method. Trim to remove any unnecessary whitespaces.
var newStr = array.join(' ').trim()