join array of stirngs one string node and add . in between each 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: joining array of string
Array.join()