Driver code
let root = new NodeTemp ( 10 ) ; let n1 = addChild ( root , 2 ) ; let n2 = addChild ( root , 3 ) ; let n3 = addChild ( root , 4 ) ; let n4 = addChild ( n3 , 6 ) ; let n5 = addChild ( root , 5 ) ; let n6 = addChild ( n5 , 7 ) ; let n7 = addChild ( n5 , 8 ) ; let n8 = addChild ( n5 , 9 ) ; traverseTree ( root ) ;