Iterating over a set
1 minute read
const set = new Set([2, 2, 3, 3, 4, 4]);
for (const val of set) {
console.log(val);
}
2
3
4
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.