With HTML like this:

Code:
<a href="#">Wikipedia <span>Some extra text here</span></a>
I'm wondering how best to check for the presence of that <span> inside the <a>. If the <span> were after the <a>, I know I could use something like if(links[i].nextSibling), but it doesn't seem to be as simple when the span is a child of the <a>.

I tried things like if(links[i].lastChild.nodeType == 1) etc. but I'm just stabbing in the dark, as you can see.