pop()
Removes an item from a list and hands it back (the last one by default).
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();
Level: Apprentice · More JavaScript terms at this level
Updated