2011-10-20から1日間の記事一覧
var 子 = function(_parent){ this.__parent = _parent; }; var 親 = function(){ this.value = 1; this.child = new 子(this); }; という感じだと var p = new 親(); p.value = 1000; console.log('親: ', p.value); // 1000が出る console.log('子: ', p.c…
var 子 = function(_parent){ this.__parent = _parent; }; var 親 = function(){ this.value = 1; this.child = new 子(this); }; という感じだと var p = new 親(); p.value = 1000; console.log('親: ', p.value); // 1000が出る console.log('子: ', p.c…