0
childNodes is not working in JavaScript
Hi Everyone, I am not able to run queries against the Node related DOM methods such as hasChildNodes,ChildNodes,parentNode etc. I am not sure if this is my machine problem or if there is any issue with my code. Please help. Code is here: https://code.sololearn.com/Wz0Hqy6oMjf9/#js
4 Answers
+ 1
you keep assigned childNodesText to a new value insde loop.
https://code.sololearn.com/Ww2MW6rbirrD/?ref=app
+ 1
hasChildNodes is a function, so use ()
parentNode and childNodes is not a function, remove ()
0
I have updated changes as you suggested. Still not getting required output
0
Thank you for your help.. I was able to fix the code.