Created
May 28, 2021 14:37
-
-
Save AdrianSkar/79eb7f49c490c648be47f46940086aa5 to your computer and use it in GitHub Desktop.
[JS] Array.entries()
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 arr = ['html', 'css', 'js']; | |
const iter = arr.entries(); | |
for (let value of iter) { | |
console.log(value); // [ 0, 'html' ], [ 1, 'css' ], [ 2, 'js' ] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment