Skip to content

Instantly share code, notes, and snippets.

@Paul-Browne
Created December 10, 2019 11:56
Show Gist options
  • Save Paul-Browne/25f6368a92770b8790c966450d698764 to your computer and use it in GitHub Desktop.
Save Paul-Browne/25f6368a92770b8790c966450d698764 to your computer and use it in GitHub Desktop.
var weekdays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"];
var eg1 = weekdays.join();
var eg2 = weekdays.join("");
var eg3 = weekdays.join(" + ");
console.log(eg1);
// "Monday,Tuesday,Wednesday,Thursday,Friday"
console.log(eg2);
// "MondayTuesdayWednesdayThursdayFriday"
console.log(eg3);
// "Monday + Tuesday + Wednesday + Thursday + Friday"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment