Converting an Array to a String in JavaScript

In your example you could just do:

myArray.join(“, “);

You can pass any string to the join method as a delimiter. See Array Join method documentation

1 Like