Baseline 2024
Newly available
Set
ì¸ì¤í´ì¤ì isSubsetOf()
ë©ìëë íëì ì§í©ì ë°ìì ì´ ì§í©ì 모ë ììê° ì£¼ì´ì§ ì§í©ì ìëì§ ì¬ë¶ë¥¼ ëíë´ë ë¶ë¦¬ì¸ì ë°íí©ëë¤.
other
Set
ê°ì²´ í¹ì ì ì¬ Set ê°ì²´ì
ëë¤.
ì´ Setì 모ë ììê° other
Setì ìë¤ë©´ true
를 ë°ííë©°, ê·¸ë ì§ ìì¼ë©´ false
를 ë°íí©ëë¤.
ìíì í기ë²ì¼ë¡ ë¶ë¶ì§í©(subset)ì ìëì ê°ì´ ííí ì ììµëë¤.
A â B â â x â A , x â B A\subseteq B \Leftrightarrow \forall x\in A,,x\in B벤 ë¤ì´ì´ê·¸ë¨ì ì¬ì©íìë©´ ìëì ê°ìµëë¤.
ì°¸ê³ : ë¶ë¶ì§í© ê´ê³ë ì ì í ë¶ë¶ì§í©ì´ ìëë¯ë¡ isSubsetOf()
ë this
ê³¼ other
ì ëì¼í ììê° í¬í¨ëì´ ìì¼ë©´ true
를 ë°íí©ëë¤.
isSubsetOf()
ë ì ì¬ Set ê°ì²´ë¥¼ other
매ê°ë³ìë¡ ë°ìµëë¤. ì¬ì©ì ì½ë를 í¸ì¶íì§ ìê³ this
ì ì ì¥ë 기본 ë°ì´í°ë¥¼ ì§ì ê²ìí기 ë문ì ì¤ì this
ì¸ì¤í´ì¤ì¬ì¼ í©ëë¤. ê·¸ë¬ë©´ ê·¸ ëìì this
ì other
ì í¬ê¸°ì ë°ë¼ ë¬ë¼ì§ëë¤.
this
ì other.size
ë³´ë¤ ë§ì ììê° ìì¼ë©´ false
를 ë°ë¡ ë°íí©ëë¤.this
ì ìì를 ìííê³ this
ì ìì e
ë¡ ì¸í´ other.has(e)
ê° ê±°ì§ê°ì ê° ê°ì ë°ííë ê²½ì° false
를 ë°íí©ëë¤. ê·¸ë ì§ ìì¼ë©´ true
를 ë°íí©ëë¤.4ì ë°°ì(<20)ì Setì ì§ì Set(<20)ì ë¶ë¶ì§í©ì ëë¤.
const fours = new Set([4, 8, 12, 16]);
const evens = new Set([2, 4, 6, 8, 10, 12, 14, 16, 18]);
console.log(fours.isSubsetOf(evens)); // true
ìì(<20)ì Setì íì(<20) Setì ë¶ë¶ì§í©ì´ ìëëë¤. 2ë ììì§ë§ íìê° ìë기 ë문ì ëë¤.
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(primes.isSubsetOf(odds)); // false
ìì ëì¼í Setì ìë¡ìê² ë¶ë¶ì§í©ì ëë¤.
const set1 = new Set([1, 2, 3]);
const set2 = new Set([1, 2, 3]);
console.log(set1.isSubsetOf(set2)); // true
console.log(set2.isSubsetOf(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