TECHSITH = Technology Simple Intuitive Tutorial Home


JavaScript Classes

JavaScript Classes

Class Keyword JavaScript uses the class keyword, which was introduced in ES2015. Prior to ES2015, you can create objects by using function constructors and prototype inheritance. There are many developers who believe that classes do not belong to JavaScript. They consider JavaScript as a functional programming language. I have heard opinions from the other side …

JavaScript Classes Read More »

prototype property javaScript

JavaScript Prototype Explained

Every constructor function has a property called prototype. You can add properties and methods to it. Using a constructor function, When you create a new object, the object has access to prototype methods. Sample code: let Car = function(color) { this.color = color; }; Car.prototype.getColor = function() { return this.color; }; let redCar = new …

JavaScript Prototype Explained Read More »

javaScript function constructors

JavaScript Function Constructors

It is very important to understand how JavaScript function constructors work before we move to higher level topics of Object Oriented JavaScript. In this article, I am not going to explain about the JavaScript class constructor. Instead, I’ll explain about ‘function’ constructors. The ultimate objective of Object Orient Programming is to create objects with ease. …

JavaScript Function Constructors Read More »

Scroll to Top