Home > Net >  Is ES6 dynamic object property or plain bracket notation being used here?
Is ES6 dynamic object property or plain bracket notation being used here?

Time:04-06

In enter image description here

CodePudding user response:

The reason why they called it a dynamic property is because from the perspective of the total object - the language variable that is being passed in as a key can contain any value during the application runtime, hence hypothetically any property can be accessed at different runs - making it dynamic.

So the instructor was correct, even though there is no other official term for using a variable as a property accessor.

  • Related