An explanation of the JavaScript constructor function 

Becoming familiar with the constructor function is important as we'll be using it to build our blockchain data structure. By now, you must be wondering what a constructor function is and what it actually does.

A constructor function is simply a function that creates an object class and allows you to easily create multiple instances of that particular class. What this actually means is that the constructor function allows you to create a lot of objects very quickly. All of these objects that are created will have the same properties and functionalities because they are all part of the same class. Now, all of this might seem a little bit confusing when you hear it for the first time, but ...

Get Learn Blockchain Programming with JavaScript 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.