Last active
November 20, 2019 21:19
-
-
Save chathurawidanage/ef7709dd7b4a0755427aebc9abf2566b to your computer and use it in GitHub Desktop.
Iterate over javascript arrays with for in | Performance Comparison [https://gists.cwidanage.com/2019/11/how-to-iterate-over-javascript-arrays.html]
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
let arr = [1,2,3,4]; | |
for(let i in arr){ | |
let x = i+1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment