J
josh
Hi If I have
function obj()
{
this.id;
function init()
{
this.id = 100;
}
}
and then:
var o = new Obj();
o.id; // print me undefined
why? private methods cannot access public properties?
function obj()
{
this.id;
function init()
{
this.id = 100;
}
}
and then:
var o = new Obj();
o.id; // print me undefined
why? private methods cannot access public properties?