object['bananas'] vs object[bananas] Are they the same thing?

后端 未结 0 1729
被撕碎了的回忆
被撕碎了的回忆 2020-12-19 07:51

let object = {bananas: 12};

How come when I used object[\'bananas\'] it worked, but when I use object[bananas], it doesn\'t work, and gives me an error?

相关标签:
回答
  • 消灭零回复
提交回复
热议问题