Tree node in javaScript



I have created a tree structure using javascript , I am confused how
to create a subnode during runtime, its like right clicking the main
node and making it to create subnode

.