Consider the following sample:
var Container = function(param) {
this.member = param;
var privateVar = param;
if (!Container.prototype.stamp) { // <-- executed on the first call only
Container.prototype.stamp = function(string) {
return privateVar + this.member + string;
}
}
}
var cnt = new Container();
Is there any way to determine whether the object cnt has a method named stamp without knowing that it is instantiated from Container ?
