Overriding Methods & Properties

This lesson teaches how to override methods and properties in both ES5 and ES6 versions of JavaScript.

Overriding in ES5 Version

The properties and methods defined on the prototype of a constructor function can be overridden when inherited by another constructor function.

Example

Let’s take a look at an example implementing this:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy