Pankaj Bisht
Pankaj Bisht

Reputation: 994

How constructor can call, own prototype

I want to call Constructor A prototype in my code:

var A = function () {
 // ? call to A.prototype.a  
};

A.prototype.a = function () {
 // print
};

Upvotes: 0

Views: 23

Answers (1)

1cgonza
1cgonza

Reputation: 1588

var A = function () {
 // ? call to A.prototype.a
 this.a();
};

Upvotes: 1

Related Questions