0
childNodes
Hello all ! 4 paragraphs and 4 titles were placed inside the dev, then were used childNodes to identify the dev. Why did you find 17? Why are even numbers missing? Where does this explain? Headlines in red. Sorry about the language https://code.sololearn.com/WA3N3YqfrWZn
2 Respuestas
+ 2
"text is considered as nodes. Comments are also considered as nodes."
https://www.w3schools.com/jsref/prop_node_childnodes.asp
+ 1
For checking of element nodes, use children method instead.
https://code.sololearn.com/W4OlqCFYJ1Xm/?ref=app
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/children