Skip to content

Instantly share code, notes, and snippets.

@tofusoup429
Created August 12, 2021 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tofusoup429/7284b3bdfb04225f9f009dd310e3a0a2 to your computer and use it in GitHub Desktop.
Save tofusoup429/7284b3bdfb04225f9f009dd310e3a0a2 to your computer and use it in GitHub Desktop.
const months = ["Jan", "Mar", "Mar", "April"];
let febs = ["Feb", "Feb2", "Feb4"];
let returnedValue = months.splice(1, 3, ...febs);
console.log(returnedValue)
//output: ["Mar","Mar","April"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment