SAPO::Utility.Array->inArray

This method will return (true or false) if a value exists in an array.

This is static method.

Syntax

SAPO.Utility.Array.inArray(string, array)

Compatibility

All browsersYes

Depends

Input Parameters

  • (string) string : Input string
  • (object) array : Input array

Sample

 http://js.sapo.pt/SAPO/Utility/String/sample/

Example

var aArray = ['orange', 'apple', 'tomato'];
alert(SAPO.Utility.Array.inArray('apple', aArray));

Community feedback

Error: Failed to load processor AddComment
No macro or processor named 'AddComment' found