Array.include()
Revision as of 02:01, 19 May 2020 by Devika (talk | contribs) (Created page with "* << Z3 Home * Z3 Language Documentation * Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member F...")
Array.include(valueToFind[, fromIndex])
This function determines whether an array include a certain value, returning true or false as appropriate.The result is true if the given value is found within the array otherwise false. Values of zero are all considered to be equal, regardless of sign. So -0 is considered to be equal to both 0 and +0, but false is not considered to be the same as 0.
[1, 2, 3].include(2) true
[1, 2, 3].include(4) false
[1, 2, 3].include(3, 3) false
[1, 2, 3].includes(3, -1) true
[1, 2, NaN].includes(NaN) true