# 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).

```javascript
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](https://www.ask-codey.com/glossary?category=javascript&level=2)

Updated: November 9, 2026

## In other subjects

- [pop() in Python](https://www.ask-codey.com/glossary/pop)

Source: https://www.ask-codey.com/glossary/pop-javascript
