Dude, get element by class is kinda outdated tbh. `querySelectorAll` is way more flexible—you can use it like `document.querySelectorAll('.my-class')` and it returns a NodeList that supports `forEach`.
But if you’re stuck with get element by class, remember it’s case-sensitive and won’t work if the elements are hidden or not in the DOM yet.
Check your dev tools to confirm the elements exist when your code runs!
But if you’re stuck with get element by class, remember it’s case-sensitive and won’t work if the elements are hidden or not in the DOM yet.
Check your dev tools to confirm the elements exist when your code runs!
