Home > Topic List > Introduction to inarray usage

Introduction to inarray usage

inarray is a function for arrays, mainly used to determine whether an element exists in the array. It receives two parameters: the element to find and the array. Returns the index of the element in the array if it exists; -1 if it does not exist. The syntax of inArray() function: inArray(searchElement, array).

Related Tutorials More >