JavaScript for WordPress Forums Vanilla JavaScript 1.3.04 – Traversing the DOM – Differences between parentElement and parentNode Reply To: 1.3.04 – Traversing the DOM – Differences between parentElement and parentNode

#25479
Zac Gordon
Keymaster

Hi John!

The problem might be that you’re using getSelector, which is not a real method. Maybe querySelector is what you meant and should work.

Also remember JS is zero indexed so the first element in an array is atray[0] rather than array[1]

Hope that helps a bit and great job practicing everything!!!