Try this:
console.log("[ " + array.join(", ") + "] ")
array.join will create a new string that is formed by concatenating all the values in the array with a specified string between them.
1
solved Javascript replace not removing quotes from array