...
There is an infix operator for testing membership, ><
. The >< operator tests the number or string in the right operand for membership in the map or array given by the left operand. For maps, membership extends to keys only.
Code Block | ||||
---|---|---|---|---|
| ||||
a = [5, 6, 7]; m = {"a" : 1, "b" : 2}; a >< 6 // returns true a >< 3 // returns false m >< "a" // returns true m >< "foo" // returns false |
...