Can you use computed property names in ES6 object literals?

  • Yes
  • No
  • Only in class declarations
  • Only in arrow functions
Yes, in ES6 object literals, you can use computed property names, allowing you to dynamically set property names based on variables or expressions.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *