一共就两点要注意:
1.var variables are either function-wide or global, they are visible through blocks
2.all var are hoisted(raised) to the top of the function,Declarations are hoisted,but assignments are not
一共就两点要注意:
1.var variables are either function-wide or global, they are visible through blocks
2.all var are hoisted(raised) to the top of the function,Declarations are hoisted,but assignments are not