Calling all CodeNewbies! I've been working on leveling up my JavaScript skills and ran into these two methods. Can you all help me figures our what querySelectorAll and getElementsBy methods return?
'Preciate your help!
Calling all CodeNewbies! I've been working on leveling up my JavaScript skills and ran into these two methods. Can you all help me figures our what querySelectorAll and getElementsBy methods return?
'Preciate your help!
For further actions, you may consider blocking this person and/or reporting abuse
Barek -
Barek -
swiftproxy -
Vitarag -
Top comments (1)
Well to the best of my knowledge, querySelectorAll returns all selectors that is being targeted (e.g query selector all(".hello") selects all elements with the class "hello".
haven't really come across getElementsBy methods before, but I guess its basically targeting all elements with a particular method. But if you meant getElementById - The document.getElementById() method returns the element of specified id.