变量使用最好都要定义.如果在function里的同名变量使用了var定义,那function.tree就和tree不是同一个.当function执行完毕,function.tree就释放了.如果在function里直接使用tree而没有定义,那function里的tree就和全局的tree是一个变量.var tree;function create(tree) {
 var tree = 0;}