Baseline 2024
Newly available
Set
ì¸ì¤í´ì¤ì union()
ë©ìëë ì§í©ì ë°ìì ì´ ì§í©ê³¼ 주ì´ì§ ì§í© ì¤ íë ëë ë ë¤ì ìë ìì를 í¬í¨íë ì ì§í©ì ë°íí©ëë¤.
other
Set
ê°ì²´ í¹ì ì ì¬ ì§í© ê°ì²´
ì´ ì§í©ê³¼ other
ì§í© 모ë ìí´ìê±°ë í ìª½ë§ ìí´ ìë ììê° í¬í¨ë ì Set
ê°ì²´ì
ëë¤.
í©ì§í©(union)ë ìíì í기ë²ì¼ë¡ ë¤ìê³¼ ê°ì´ ì ìí©ëë¤.
A ⪠B = { x ⣠x â A or x â B } A\cup B = {x\midx\in A\text{ or }x\in B}벤 ë¤ì´ì´ê·¸ë¨ì¼ë¡ íííìë©´ ìëì ê°ìµëë¤.
union()
ì other
매ê°ë³ìë¡ ì ì¬ ì§í© ê°ì²´ë¥¼ ë°ìµëë¤. ì¬ì©ì ì½ë를 í¸ì¶íì§ ìê³ this
ì ì ì¥ë 기본 ë°ì´í°ë¥¼ ì§ì ê²ìí기 ë문ì this
ë ì¤ì Set
ì¸ì¤í´ì¤ì¬ì¼í©ëë¤. ê·¸ë° ë¤ì keys()
ë©ìë를 í¸ì¶íì¬ other
ì ìííê³ this
ì 모ë ììì other
ì ìë 모ë ììë¡ ìë¡ì´ ì§í©ì 구ì±í©ëë¤.
ë°ííë ì§í©ì ììì ììë this
ì ìë ììê° ë¨¼ì ì´ë©°, ê·¸ ì´íì other
ììì
ëë¤.
ë¤ì ìì ë íì ì§í©(<10)ê³¼ ìì ì ê³±ì ì§í©(<10)ê³¼ì í©ì¡í©ì ê³ì°íë ìì ì ëë¤. ê²°ê³¼ë í íì í¹ì ìì ì ê³±ì ì¤ í ê³³ìë§ ìíê±°ë ë ë¤ ëª¨ë ìí ì§í©ì ëë¤.
const evens = new Set([2, 4, 6, 8]);
const squares = new Set([1, 4, 9]);
console.log(evens.union(squares)); // Set(6) { 2, 4, 6, 8, 1, 9 }
ëª
ì¸ì ë¸ë¼ì°ì í¸íì± ê°ì´ 보기
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