Push the child nodes of temp into the queue
q . push ( temp . child [ i ] ) ; } } if ( flag == 0 ) document . write ( " " ) ; } function constructTree ( ) { let root = newNode ( 10 ) ; ( root . child ) . push ( newNode ( 20 ) ) ; ( root . child ) . push ( newNode ( 30 ) ) ; ( root . child ) . push ( newNode ( 40 ) ) ; ( root . child [ 0 ] . child ) . push ( newNode ( 50 ) ) ; ( root . child [ 0 ] . child ) . push ( newNode ( 60 ) ) ; ( root . child [ 1 ] . child ) . push ( newNode ( 70 ) ) ; ( root . child [ 1 ] . child ) . push ( newNode ( 80 ) ) ; ( root . child [ 2 ] . child ) . push ( newNode ( 90 ) ) ; ( root . child [ 2 ] . child ) . push ( newNode ( 100 ) ) ; ( root . child [ 2 ] . child ) . push ( newNode ( 110 ) ) ; return root ; }