What is the output of the following? “`js console.log(typeof class {}); “`

JavaScript Developer Hard

JavaScript Developer — Hard

What is the output of the following? “`js console.log(typeof class {}); “`

Key points

  • Classes in JavaScript are syntactic sugar for constructor functions
  • The `typeof` operator returns the type of a variable or expression
  • The output 'function' indicates that the class is a function type

Ready to go further?

Related questions