+ 2
JS Question
What is the difference between "querySelector()" and "querySelectorAll()"? I haven't been able to sleep because of it! 😩
2 odpowiedzi
+ 3
Bismark GC
querySelector():
Returns the first element that matches the specified CSS selector.
If no match is found, it returns null.
querySelectorAll():
Returns a NodeList containing all elements that match the specified CSS selector.
If no match is found, it returns an empty NodeList.
0
Nisha