Yes. You are right. Also, If you want to select only the first element then getElementById have far better performance than the class selector or query selector. -> jsbench.me/jckff66u9z/1
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'd added document.querySelector(".example") to your list. Gives you more jquery like querying.
w3schools.com/jsref/met_document_q...
Yes. You are right. Also, If you want to select only the first element then
getElementById
have far better performance than the class selector or query selector. -> jsbench.me/jckff66u9z/1