jPaq Docs - Arrays as Sets

Quick Stats

Target Platforms:  PC (JScript) and the web (JavaScript)
Download Count:  833

Summary

Gives the ability to use union, intersect and find the difference of two sets.

Documentation for Children

  • Array.prototype.intersect()
    Gets a new array of all of the elements that are in this array and another array.
  • Array.prototype.subtract()
    Gets a new array which contains all of the elements that are in this array but not another one.
  • Array.prototype.union()
    Gets a new array which contains all of the elements that are in this array and the other one. Any elements found in the other array that are already in this one will not be added to this array.