function Dog(name) {
this.name = name;
this.speak = function() {
return this.name + " says woof";
}
}
console.log(Dog.prototype);
// The Output
{
constructor: Dog(name) {
this.name = name;
this.speak = function() {
return this.name+" says woof";
}
},
__proto__: Object { ... }
}
Here are the 2 links: