To define a function as a method in an object literal, ES6 syntax does not require the ________ keyword.

  • function
  • method
  • this
  • function
In ES6, when defining a method in an object literal, you can use the concise method syntax by omitting the "function" keyword, making the code more succinct and aligned with modern practices.
Add your answer
Loading...

Leave a comment

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