Code

General Code

JavaScript Instances

In the last post, I briefly discussed JS constructors. In that post, I showed how to create an instance of a constructor with the new operator. Our constructor was rather ‘blah’. So let’s see how we can access constructor instance properties and methods. The aforementioned constructor code gives us a horse constructor to be able

JavaScript Instances Read More »

JavaScript Constructors

If you come from a classical object-oriented language, then constructors are second nature to you. They are a recent phenomenon in JS. If you utilize something like TypeScript, which is a superset of JS, then you utilize constructors all the time. In vanilla JS, constructors are simply function objects. This might create a problem wherein

JavaScript Constructors Read More »