maps
hasvalue(myMap, item)
- Returns 1 if the list has a value else return 0.
Parameters
myMap(list|map): The list that contains the item.item(any): The item that is contained in the list.
Return
- (number): 1 if the item is found else 0.
Example
myMap = {0:"dog", 1:"cat", 2:"monkey"}if myMap.hasvalue("cat") then print("The cat has been found")if hasvalue(myMap, "cat") then print("The cat has been found")Result:
The cat has been foundThe cat has been found