Last active
December 12, 2021 12:41
-
-
Save YasirGaji/2b0826d887b4bfeec3c911da3776a719 to your computer and use it in GitHub Desktop.
This gist indicates how to call child nodes of an element its further explained in the DOD article by Yasir Gaji
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
let val; // initilizing alpha variable | |
const list = document.querySelector('ul.showcase'); // assigning sub variable "list" to the ul in the html collection | |
val = list.childNodes; // HERE THE METHOD "childNodes" IS ASSIGNED TO THE "list" VARIABLE TO GET IT'S CHILD NODES | |
console.log(val); // calling the alpha variable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment