I have this object:
var x = function(){
var returnObj = {
constructor:function(ieps){
this.jow = ieps
}
}
returnObj.constructor.prototype.build = function(){
alert(this.jow)
}
return returnObj
}
That i would like to call with this:
var jow = new x.constructor("ieps")
jow.build()
So i try to get the build() to execute the alert but i get a x.build() is undefined.
Any ideas?
thx,
x:new (x().constructor)('foo'). You can only access the return value of the function if you call the function.()to the end of that function.