Passing a class as an argument

Classes, like functions, are first class citizens in JavaScript. This means that they can be returned from functions or passed as arguments. In this recipe, we'll see how to use the latter.

Get ECMAScript Cookbook 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.