J
Joe Kelsey
When defining public methods, which style do you prefer:
style 1:
function myObject (...)
{
this.member = 0;
}
myObject.prototype.method = function ()
{
//...
}
or style 2:
function myObject (...)
{
this.member = 0;
myObject.prototype.method = function ()
{
//...
}
}
Can I use this.prototype within an object definition?
/Joe
style 1:
function myObject (...)
{
this.member = 0;
}
myObject.prototype.method = function ()
{
//...
}
or style 2:
function myObject (...)
{
this.member = 0;
myObject.prototype.method = function ()
{
//...
}
}
Can I use this.prototype within an object definition?
/Joe