pop()
noun
say it: “POP” /pɒp/
A JavaScript array method that removes the last item from the array and hands it back to you, so you can use it.
What does pop() do in JavaScript?
pop() — Removes an item from a list and hands it back (the last one by default).
const tasks = ["Test", "Deploy"];
const lastTask = tasks.pop();
In a sentence
- “I called playlist.pop() to take Windows Down off the end and keep it in a variable called skipped.”
Level: Apprentice · More JavaScript terms at this level
Updated