I have a function which I am using as a constructor. When I assign a function to it prototype and invoke the function, I only see the value x and not the testMethod which I augmented. I was expecting the augmented function also to be printed when i refer to the this. Is my understanding correct.
function Test(x){
this.x=x;
}
Test.prototype.testMethod=function(){
console.log(this);
}
var t= new Test(5);
t.testMethod();

thisrefers to the instance you've created, if you check its prototype you'll see your function.