A class in ES6 is a special type of function, and it can be declared using the ________ keyword.

  • function
  • class
  • object
  • define
In ES6, the class keyword is used to declare a class. Unlike functions, classes support class-based inheritance, providing a cleaner syntax for object-oriented programming in JavaScript.
Add your answer
Loading...

Leave a comment

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