Created
January 2, 2019 18:30
-
-
Save emeaguiar/9f49fd598a4b4348969f19e6d8c9acdb 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' ]; | |
// Elimina el primer elemento del array | |
const removedElement = array.shift(); | |
// [ 'bar', 'baz' ] | |
console.log( array ); | |
// 'foo' | |
console.log( removedElement ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment