Just as there are two ways of defining functions, function declarations and function expressions, there are two ways to define a class: using the class declaration and the class expression.
Defining a class
Get Learn ECMAScript - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.