JavaScript 2025 · Arrays

Check if an array contains a value

Return true if the value is in the array.

const found = [1, 2, 3].includes(2);

Official JavaScript 2025 documentation

More arrays commands

All arrays commands · JavaScript 2025 cheatsheet

Was this page helpful?