Last active
June 23, 2018 18:39
-
-
Save nairihar/c0a9c13b135bbe7c849e63ea5b0afd38 to your computer and use it in GitHub Desktop.
JavaScript series, part 1, Set, medium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.time('Set test'); | |
const set = new Set(); | |
const count = 10; | |
for (let i = 0; i < count; i++) { | |
set.add(i); | |
} | |
for (let i = 1; i < count; i+=2) { | |
set.delete(i); | |
} | |
console.timeEnd('Set test'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment