Owennn Owennn - 3 months ago 5x
Javascript Question

How to join array of strings in Javascript

I want to join an array of

result = ["July"," ","1st"]
result = ["July 1st"].
I also want to have the comma removed.

I have tried result.join() and result.join(",") but it didn't work. In fact, nothing changes. Can anyone help me to solve this problem? Thanks.


You just need to join it and put into an array...:

result = [result.join('')];