If I do something like this:
Cnst = function() {
// blah
}
Cnst.prototype. meth = function() {
// blah
}
var foo = new Cnst()
how can I get the name of the var (in this case 'foo'), or at least some
reference to it, when I'm within one of the constructor's prototypes?
Something like:
Cnst.prototype. meth = function() {
this.var = ???
}
Andrew Poulos
Cnst = function() {
// blah
}
Cnst.prototype. meth = function() {
// blah
}
var foo = new Cnst()
how can I get the name of the var (in this case 'foo'), or at least some
reference to it, when I'm within one of the constructor's prototypes?
Something like:
Cnst.prototype. meth = function() {
this.var = ???
}
Andrew Poulos
Comment