Hello Friends 👋,
Welcome To Infinitbility! ❤️
includes() also use for the search string in the array you have to only pass user search text as a value in the
1['red', 'green'].includes('red') //true ✅23['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.
1"Search String Match or not".includes('or');2// <.true
Thanks for Reading…
Join our email list and get notified about new content
No worries, I respect your privacy and I will never abuse your email.
Every week, on Tuesday, you will receive a list of free tutorials I made during the week (I write one every day) and news on other training products I create.