Assume you have a JavaScript class, Car. You can create an instance of it:
new Car()
It’s really just a constructor function:
function Car() {}
Then:
-
Car.prototype.methodis an instance method. -
this.varinsideCar()constructor or an instance method is an instance variable. -
Car.varis a static (class-level) variable. -
Car.methodis a static method.