What is node counting logic in javascript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

What is node counting logic in javascript?

may b in javascript nodes are counting like as starting point node 1..end tag of same tag as node 3..am I r8?

6th May 2017, 4:30 AM
Nayan Pal
Nayan Pal - avatar
2 Answers
+ 6
I'm not sure to good understang your unclear question, but I will try some explanation: A 'tag' is the text for coding an html 'element'. Almost elements can embed content, so require an opening and a closing tags. Each tag/element can have some attributes. The 'DOM' ( document object model ) is the data structure used to store the parsed html code. This data structre is a tree list, composed of 'nodes'. Each 'node' can be of different type: element, attribut, text, comment, and so on... but an element is stored in once node, as the closing tag is only necessary in text encoding of this tree list structure, not else ( structure is encoded by assigning childs lists and parent references properties to the node object ).
6th May 2017, 9:59 AM
visph
visph - avatar
- 1
thank u
12th May 2017, 7:02 AM
Nayan Pal
Nayan Pal - avatar