Which keyword is used to define a class in ES6?

  • class
  • type
  • struct
  • interface
In ES6, the class keyword is used to define a class. It provides a cleaner syntax for creating constructor functions and prototypes. Classes allow for easier code organization and inheritance in JavaScript.
Add your answer
Loading...

Leave a comment

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