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"
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments