Returns a new set that contains the elements of setA that are not in setB. Taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set.
setA
setB
const setA = new Set([1, 2, 3, 4]);const setB = new Set([3, 4, 5, 6]);setDifference(setA, setB); // Set [1, 2] Copy
const setA = new Set([1, 2, 3, 4]);const setB = new Set([3, 4, 5, 6]);setDifference(setA, setB); // Set [1, 2]
Returns a new set that contains the elements of
setAthat are not insetB. Taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set.