Difference between revisions of "Array.include()"
Jump to navigation
Jump to search
(Created page with "* << Z3 Home * Z3 Language Documentation * Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member F...") |
|||
Line 26: | Line 26: | ||
[[Array.implode() | implode]] | [[Array.implode() | implode]] | ||
− | |||
− |
Latest revision as of 02:03, 19 May 2020
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