Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.
You can check if an array contains a value using the includes() method.
Here’s an example:
const list = [1, 2, 3, 4]
list.includes(1) //true
list.includes(5) //false