Skip to content

Instantly share code, notes, and snippets.

@emeaguiar
Created January 2, 2019 18:02
Show Gist options
  • Save emeaguiar/90d611d2beb2efcdd51475d28d5d392f to your computer and use it in GitHub Desktop.
Save emeaguiar/90d611d2beb2efcdd51475d28d5d392f to your computer and use it in GitHub Desktop.
const array = [ 'foo', 'bar', 'baz' ];
// Empezando en la posición 1, elimina el siguiente elemento
const removedElement = array.splice( 1, 1 );
// [ 'foo', 'baz' ]
console.log( array );
// [ 'bar' ]
console.log( removedElement );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment