Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let arr = [1, 2, 3, 4, 5];
- arr.shift() // works but mutates the array
- arr.forEach(function(value) {
- console.log(value)
- });
- 2
- 3
- 4
- 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement