Created
January 2, 2019 18:18
-
-
Save emeaguiar/3edeb8bd80da1dcacc4bf6f063fdcc9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const array = [ 'foo', 'bar', 'baz' ]; | |
// Empezando en la posición 1, elimina los dos siguientes elementos | |
const removedElement = array.splice( 1, 2 ); | |
// [ 'foo' ] | |
console.log( array ); | |
// [ 'bar', 'baz' ] | |
console.log( removedElement ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment