Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
themeConfluence
languagejavascript
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

...