Assigning properties with constructor arguments

Now that we have a new class, it's time to start differentiating instances. In this recipe, we'll see how to assign properties when instances are created, via constructor arguments.

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.