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
When you call join without any argument being passed, ,(comma) is taken as default and toString internally calls join without any argument being passed.
So, pass your own separator.
var str = array.join(' '); //'apple tree'
// separator ---------^