Home / Javascript Tips Generated By ChatGPT / Joining Array Elements into a String with join in Javascript Combine elements of an array into a single string. Source Code let pathParts = ["home", "projects", "demo"]; console.log(pathParts.join("/")); // "home/projects/demo"