Skip to content

Instantly share code, notes, and snippets.

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