Skip to content

Instantly share code, notes, and snippets.

@Paul-Browne
Last active December 10, 2019 13:50
Show Gist options
  • Save Paul-Browne/b800fc41f0ee0da5fc0450af465cc554 to your computer and use it in GitHub Desktop.
Save Paul-Browne/b800fc41f0ee0da5fc0450af465cc554 to your computer and use it in GitHub Desktop.
var days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Saturday", "Sunday"];
var removed = days.splice(4, 2, "Friday");
console.log(days);
// ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
console.log(removed);
// [Saturday, Sunday]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment