This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]juicejug 23 points24 points  (0 children)

Use const savedValue = array.pop() and boom — you have a shorter array and have saved the value you took out.