Enriching a web page by
generating browser-specific HTML content or CSS styling,
inserting dynamic HTML content,
producing special audio-visual effects (animations).
Enriching a web user interface by
implementing advanced user interface components,
validating user input on the client side,
automatically pre-filling certain form fields.
Implementing a front-end web application with local or remote data storage.
class syntax. Before ES2015, classes had to be defined by following a code pattern in the form of special JS objects: either as
constructor functions or as factory objects. Notice that when using (the
syntactic sugar of) ES2015
class declarations, what is really defined internally, is still a constructor function.