var foo = {a: "alpha", 2: "two"};
foo[a] --> ReferenceError: a is not defined
foo[2] --> "two"
foo.a --> "alpha"
console.log(foo.2) --> SyntaxError: missing ) after argument list
foo["a"] --> "alpha"
foo["2"] --> "two"
标签:div erro reference alpha def ons argument list error
var foo = {a: "alpha", 2: "two"};
foo[a] --> ReferenceError: a is not defined
foo[2] --> "two"
foo.a --> "alpha"
console.log(foo.2) --> SyntaxError: missing ) after argument list
foo["a"] --> "alpha"
foo["2"] --> "two"
标签:div erro reference alpha def ons argument list error
原文地址:http://www.cnblogs.com/JaneBlog/p/8033098.html