Skip to content

Instantly share code, notes, and snippets.

@NishantThapa
Last active December 20, 2020 12:55
Show Gist options
  • Save NishantThapa/25f7eb4eb82b42aa8d7985139a86e37b to your computer and use it in GitHub Desktop.
Save NishantThapa/25f7eb4eb82b42aa8d7985139a86e37b to your computer and use it in GitHub Desktop.
Delete value from array on the basis of index
const filteredItems = questions.slice(0, i).concat(questions.slice(i + 1, questions.length))
// Es6
Temp = array.filter((item) => item !== value); // it will return all values except "value"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment