Created
December 18, 2017 16:34
-
-
Save Splode/4f6629dd6e774a5ffd2f8cd923bf7afe to your computer and use it in GitHub Desktop.
Iterate over the array-like object, HTMLCollection using Array.prototype
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
// HTML Collection | |
const articles = document.querySelectorAll('.article') | |
// Iterate using Array.prototype | |
Array.prototype.forEach.call(articles, el => { | |
// iterate over el | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment