Please explain ("a:last")[0]
I'm a jQuery rookie and still trying to find my way here. I came across this piece of code
- $(this).find("a:last")[0].nextSibling.nodeValue;
From what I understand, selector
:last will select the last element. In that case, why do we need to specify [0]? Will
("a:last") return more than one element? Please explain the significance of using the array for selection here.
Thanks!