I\'m trying to set get id of all elements in an HTMLCollectionOf. I wrote the following code:
HTMLCollectionOf
var list = document.getElementsByClassName(\"event
You want to change it to
var list= document.getElementsByClassName("events"); console.log(list[0].id); //first console output for (key in list){ console.log(list[key].id); //second console output }