| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Set/difference | [Back] [Original] |
Get to know MDN better
difference(other)
Set Set other
(difference)
AB={xAxB}A\setminus B = \{x\in A\mid x\notin B\}difference() Set other this this Set this other
Set this
10 10
const odds = new Set([1, 3, 5, 7, 9]);
const squares = new Set([1, 4, 9]);
console.log(odds.difference(squares)); // Set(3) { 3, 5, 7 }
| ECMAScript 2027 LanguageSpecification # sec-set.prototype.difference |
| Web Proxy Viewer | New URL | Original Page |