Last active
June 23, 2018 18:39
-
-
Save nairihar/2f86209fc23359829fec24ba1c70c7ef 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('Array test'); | |
const arr = []; | |
const count = 10; | |
for (let i = 0; i < count; i++) { | |
arr.push(i); | |
} | |
for (let i = 1; i < count; i+=2) { | |
arr.splice(arr.indexOf(i), 1); | |
} | |
console.timeEnd('Array test'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment