Last active
September 29, 2017 18:32
-
-
Save rbren/36a03f22c9bafe98952c3d0951eb8f4a to your computer and use it in GitHub Desktop.
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
const BEATLES = ['john', 'paul', 'george', 'ringo']; | |
// Regular for loop: | |
for (let i = 0; i < BEATLES.length; ++i) { | |
console.log(BEATLES[i]); | |
} | |
// With Array.forEach: | |
BEATLES.forEach(beatle => console.log(beatle)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment