js array to strings code example
Example 1: join last element of array javascript with different value
['tom', 'dick', 'harry'].join(', ').replace(/, ([^,]*)$/, ' and $1')
> "tom, dick and harry"
Example 2: js array to string
var myArray = ['no','u'];
var myString = myArray.toString();
Example 3: array to string javascript
<array>.join(<splitting character(s)>);