Baseline 2024
Newly available
Set
ì¸ì¤í´ì¤ì isSupersetOf()
ë©ìëë íëì Setì ë°ìì 주ì´ì§ Setì 모ë ììê° ì´ Setì ìíëì§ ì¬ë¶ë¥¼ ê°ë¦¬í¤ë ë¶ë¦¬ì¸ì ë°íí©ëë¤.
other
Set
ê°ì²´ í¹ì ì ì¬ Set ê°ì²´ì
ëë¤.
other
Setì 모ë ììê° ì´ Set ìì ìì ê²½ì° true
, ê·¸ë ì§ ìì¼ë©´ false
ì
ëë¤.
ìíì í기ë²ì¼ë¡ë ììì§í©(superset)ì ìëì ê°ì´ ííí ì ììµëë¤.
A â B â â x â B , x â A A\supseteq B \Leftrightarrow \forall x\in B,,x\in A벤 ë¤ì´ì´ê·¸ë¨ì¼ë¡ë ìëì ê°ìµëë¤.
ì°¸ê³ : ì´ì§í© ê´ê³ë ìë²½í ììì§í©ì´ ìëëë¤. isSupersetOf()
ë this
ê³¼ other
ì ëì¼í ììê° í¬í¨ëì´ ìì¼ë©´ true
를 ë°íí©ëë¤.
isSupersetOf()
ë other
매ê°ë³ìë¡ ì ì¬ Set ê°ì²´ë¥¼ ë°ìµëë¤. ì´ë í ì¬ì©ì ì½ë í¸ì¶ìì´ this
ì ì ì¥ë 기본 ë°ì´í°ë¥¼ ì§ì ê²ìí기 ë문ì ì¤ì this
ì¸ì¤í´ì¤ì¬ì¼ í©ëë¤. ê·¸ë¬ë©´ ê·¸ ëìì this
ì other
ì í¬ê¸°ì ë°ë¼ ë¬ë¼ì§ëë¤.
this
ì ììê° other.size
ë³´ë¤ ì ì¼ë©´ false
를 ì§ì ë°íí©ëë¤.keys()
ë©ìë를 í¸ì¶íì¬ other
를 ìíí©ëë¤. ë§ì½ other
ì ììê° this
ì ìì¼ë©´ false
를 ë°íí©ëë¤. (ê·¸ë¦¬ê³ return()
ë©ìë를 í¸ì¶íì¬ keys()
ë°ë³µì를 ë«ìµëë¤). ê·¸ë ì§ ìì¼ë©´ true
를 ë°íí©ëë¤.ì§ì ì§í©(20 미ë§)ì 4ì ë°°ì(20 미ë§)ì ììì§í©ì ëë¤.
const evens = new Set([2, 4, 6, 8, 10, 12, 14, 16, 18]);
const fours = new Set([4, 8, 12, 16]);
console.log(evens.isSupersetOf(fours)); // true
모ë íì(20 미ë§)ì ì§í©ì 2ê° ììë ë§ì§ë§ íìë ìëë¯ë¡ ìì(20 미ë§)ì ììì§í©ì´ ìëëë¤.
const primes = new Set([2, 3, 5, 7, 11, 13, 17, 19]);
const odds = new Set([3, 5, 7, 9, 11, 13, 15, 17, 19]);
console.log(odds.isSupersetOf(primes)); // false
ìë¡ ëì¼í ì§í©ì ìë¡ì ëí´ ììì§í© ê´ê³ê° ì±ë¦½í©ëë¤.
const set1 = new Set([1, 2, 3]);
const set2 = new Set([1, 2, 3]);
console.log(set1.isSupersetOf(set2)); // true
console.log(set2.isSupersetOf(set1)); // true
ëª
ì¸ì ë¸ë¼ì°ì í¸íì± ê°ì´ 보기
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4