我正在嘗試使用動態(tài)名稱訪問對象的屬性。這可能嗎?const something = { bar: "Foobar!" };const foo = 'bar';something.foo; // The idea is to access something.bar, getting "Foobar!"
使用變量動態(tài)訪問對象屬性
慕尼黑8549860
2019-05-20 16:14:46