What are nodes?

Hi, I recently started learning JavaScript and I am trying to learn about "nodes".

What exactly are nodes? What are their functions? From what I can grasp, nodes links elements together or change them.

I've been trying to learn by using w3schools.com js tutorials and the tutorial i'm on right now has the example of this code:

[b]<!DOCTYPE html>

This is a paragraph.

This is another paragraph.

var para=document.createElement("p");
var node=document.createTextNode("This is new.");

var element=document.getElementById("div1");


With a result of:
[b]This is a paragraph.
This is another paragraph.
This is new.

Help would be greatly appreciated!


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion