arrayIncludes task is used to determine if an array includes a given element and then returns a "true" or "false" result, as appropriate. If used in conjunction with an
index task, then you can specify where in the index the search should begin.
Potential Use Case
Suppose you have a list of emails and are looking to see if a certain address is in that list. You would specify the email address you want to find and if the email is present, then your result would come back as "true". If the email is not found in the list, then your result would come back as "false".
||Array||Required. The array to search.|
||Any||Required. The element to search for.|
||Number||Optional. The position in the array to begin searching for a
||Boolean||True if the
In this IAP example:
The array is statically set and the reference variable is
searchElementto find is the number
fromIndexvariable will default to 0.
Truebecause the number
2is listed in the array.