JavaScript 2025 · Strings
Split and join
Turn a string into an array, and back again.
const words = "a,b,c".split(",");
const line = words.join(" | ");
Official JavaScript 2025 documentation
JavaScript 2025 · Strings
Turn a string into an array, and back again.
const words = "a,b,c".split(",");
const line = words.join(" | ");
Official JavaScript 2025 documentation
Was this page helpful?