Created
July 11, 2018 10:25
-
-
Save denismcdonald/151ab933a4cc307962349b76aa117975 to your computer and use it in GitHub Desktop.
forEach method for querySelectorAll (JavaScript)
This file contains 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
var elements = document.querySelectorAll("h1"); | |
Object.keys(elements).forEach(function(key) { | |
elements[key].style.color = "orange"; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment