Convert array to a string
suggest changeAn array’s join(separator) method returns its elements as one string, with a configurable separator. There is no static Array.join.
Default separator (,):
["a", "b", "c"].join() === "a,b,c"
With a string separator:
[1, 2, 3, 4].join(" + ") === "1 + 2 + 3 + 4"
With a blank separator:
["B", "o", "b"].join("") === "Bob"
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents