Skip to content

Instantly share code, notes, and snippets.

@Riccardo-Zanutta
Created August 25, 2016 19:56
Show Gist options
  • Save Riccardo-Zanutta/2705de6b9ee4eed1acbb601f43d8ed5e to your computer and use it in GitHub Desktop.
Save Riccardo-Zanutta/2705de6b9ee4eed1acbb601f43d8ed5e to your computer and use it in GitHub Desktop.
Non Mutating way to remove an element from an array
function remove(array, element) {
return array.filter(e => e !== element);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment