I am a beginner to JavaScript and on my way to Prototypes in JavaScript.
As per the article here
Creating
I would agree that terminology is incorrect.
The constructor function has a prototype
property which defines the properties and methods in the prototype chain; but it is not itself the prototype of an object, it is the constructor.
isPrototypeOf is not called on the constructor itself, but on the constructor's prototype property.
alert(person.prototype.isPrototypeOf(myFather)); // true
myFather
would be an instanceof person
, and you can test this using the following line.
alert(myFather instanceof person); // true