Set.prototype.keys()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itโs been available across browsers since โจ2015๋ 7์โฉ.
Set
์ธ์คํด์ค์ keys()
๋ฉ์๋๋ values()
๋ฉ์๋์ ๋ณ์นญ์
๋๋ค.
๊ตฌ๋ฌธ
js
keys()
๋งค๊ฐ๋ณ์
์์.
๋ฐํ ๊ฐ
์๋ก์ด ์ํ ๊ฐ๋ฅํ ๋ฐ๋ณต์ ๊ฐ์ฒด.
์์
keys() ์ฌ์ฉํ๊ธฐ
keys()
๋ฉ์๋๋ values()
์ ์๋ฒฝํ๊ฒ ๋์ผํฉ๋๋ค.
js
const mySet = new Set();
mySet.add("foo");
mySet.add("bar");
mySet.add("baz");
const setIter = mySet.keys();
console.log(setIter.next().value); // "foo"
console.log(setIter.next().value); // "bar"
console.log(setIter.next().value); // "baz"
๋ช ์ธ์
Specification |
---|
ECMAScriptยฎ 2026 Language Specification # sec-set.prototype.keys |
๋ธ๋ผ์ฐ์ ํธํ์ฑ
Loadingโฆ