为什么我不能这样做我不明白?
function hello() {
this.say = 'fdfsd';
}
function goodbye() {
this.example = new hello();
}
但如果我这样做,它会起作用;
function hello() {
this.say = 'fdfsd';
}
function goodbye() {
this.example = false;
}
var goodbye = new goodbye();
goodbye.example = new hello();