JavaScript Array includes() methodLast Updated : 17 Mar 2025 The JavaScript array includes() method checks whether the given array contains the specified element. It returns true if an array contains the element, otherwise false. SyntaxThe includes() method is represented by the following syntax: Parameterelement - The value to be searched. start - It is optional. It represents the index from where the method starts search. ReturnA Boolean value. JavaScript Array includes() method exampleHere, we will understand includes() method through various examples. Example 1Let's see a simple example to determine whether the given array contains the specified element. Test it NowOutput: true Example 2In this example, we will provide the index from where the search starts. Test it NowOutput: false Example 3Let's see one more example to determine whether the includes() method is case-sensitive. Test it NowOutput: false Next TopicJavaScript Array |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India