JavaScript Array includes() Method Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The includes() method in JavaScript returns true if an array contains a specified value, and false if the value is not found. This method simplifies checking for the presence of an element within an array, offering a quick and efficient way to return a boolean result. Syntaxarray.includes(searchElement, start);ParameterssearchElement: This parameter holds the element that will be searched.start: This parameter is optional and it holds the starting point of the array, where to begin the search the default value is 0.Return Value :It returns a Boolean value i.e., either True or False.Example of JavaScript Array includes() Method Here’s an example of the JavaScript Array.includes() method:Example 1: Searching for a number in an arrayIn this example, the includes() method checks if the number 2 is present in the array A. javascript // Taking input as an array A // having some elements. let A = [1, 2, 3, 4, 5]; // includes() method is called to // test whether the searching element // is present in given array or not. a = A.includes(2) // Printing result of includes(). console.log(a); Outputtrue Example 2: Searching for a string in an arrayIn this example, the includes() method checks if the string 'cat' is present in the array name. Since 'cat' is not in the array, it returns false. javascript // Taking input as an array A // having some elements. let name = ['gfg', 'cse', 'geeks', 'portal']; // includes() method is called to // test whether the searching element // is present in given array or not. a = name.includes('cat') // Printing result of includes() console.log(a); Outputfalse We have a complete list of Javascript Array methods, to check those please go through this Javascript Array Complete referencearticle.Supported BrowsersGoogle ChromeEdge Firefox OperaSafari Array Method - includes Visit Course Comment More info K Kanchan_Ray Follow Improve Article Tags : JavaScript Web Technologies javascript-array JavaScript-Methods Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings6 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in Javascript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)9 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readJavascript Scope3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read Like