Last active
May 25, 2016 14:30
-
-
Save proclaim/79607b87b327d526eb3d181a61fe8e2f to your computer and use it in GitHub Desktop.
Remove item from array with mutation
This file contains hidden or 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 students = ['yoshie', 'hiroshie', 'lisa', 'johnny']; | |
students.splice(0,1); | |
console.log(students); | |
// ["hiroshie", "lisa", "johnny"] | |
// mutation, 不行啊~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment