Created
June 5, 2020 14:12
-
-
Save marshallmurphy/5719f8ebe685df68e1e6b61351011c3a 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
let array = ['a', 'b', 'c', 'd', 'e'] | |
array.slice(2) | |
// returns ['a', 'b', 'c'] and original array is unchanged | |
// array = ['a', 'b', 'c', 'd', 'e'] | |
array.splice(0, 2) | |
// permanently changes the original array | |
// array = ['c', 'd', 'e'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment