Hello Friends đź‘‹,

Welcome To Infinitbility! ❤️

Javascript provides includes() method to check specific item exist or not in an array and the below example also work on if you searching for React, React Native, typescript, node, deno, next, vue, gatsby and all javascript library.

includes() also use for the search string in the array you have to only pass user search text as a value in the includes() method.

['red', 'green'].includes('red') //true âś…

['red', 'green'].includes('yellow') //false ❌

includes() method also works on a string, for example, you have description text and you want to search word on paragraph text then it also works.

"Search String Match or not".includes('or');
// <.true

Thanks for Reading…