var arr = { foo : 1, bar: { baz : 2 }, bee : 3 } function getter(variable) { return arr[variable]; }
我的代码是这样的。
相似问题