【发布时间】:2015-08-07 18:13:50
【问题描述】:
var obj = {"":"empty string", "!":"bang", "hello world":"hello world"}
-修复这些代码行使其正常工作?
无论我尝试过什么方法,我总是想出一个未定义的“”属性名称,或者在调用 ! 时出现错误。
我对编码很陌生,我不是在寻找答案,也许只是朝着正确的方向前进。所以请保持温和,感谢您的帮助
【问题讨论】:
-
Getting the value of an object's property where the key is a blank string 的可能重复项 - 使用相同的技术来获取带有感叹号的那个。