I want to get the ID of an element that I found by using getElementsByClassName()
Here is what my code looks like:
let className = document.getElementsByClassName('some-class')
for (let i = 0; i < className.length; i++) {
if (className.GETID.toLowerCase().includes('some text')) {
// do something
}
}
So basically what I want is to replace GETID with some kind of method or anyway to get the id of the Element that I have found by using the getElementsByClassName() method.