New course! Every coder should learn Generative AI!
Try a free lesson0
How'd do you call elements in JavaScript here in sololearn??Everytime I use query selector it returns null
2 Answers
+ 7
You can only get the element once the DOM is fully loaded.
Put all your js in
window.onload = () => {
// your js
}
+ 2
Wow that was easy, Thank you 😁