# includes()

*noun*

say it: **“in-KLOODZ”** **/ɪnˈkluːdz/**

A JavaScript method that answers true or false: does this array contain this value, or does this text contain this piece of text?

## What does **includes()** do in JavaScript?

**includes()** — A method that reports whether an array contains a value or a string contains text.

```javascript
const tags = ["javascript", "web"];
const hasJavaScript = tags.includes("javascript");
```

## In a sentence

- “Before adding a song, I check playlist.**includes**(song) so the same song isn't added twice.”

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=2)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/includes
