我看有错--Variables in JavaScript are fundamentally 。。

4.6. Variables as Properties
You may have noticed by now that there are a lot of similarities in JavaScript between variables and the properties of objects. They are both assigned the same way, they are used the same way in JavaScript expressions, and so on. Is there really any fundamental difference between the variable i and the property i of an object o? The answer is no. Variables in JavaScript are fundamentally the same as object properties. 



我认为作者整错了。起码

u.a = "1";
u = "1"

是不一样的。第二个u会成为全局的变量,而u.a不会

你可能感兴趣的:(JavaScript)