2016-09-07から1日間の記事一覧
// Classぽく書く function Foo(hoge) { this.hoge = hoge; } Foo.prototype = { method_a: function() { console.log(this.hoge); }, method_b: function() { } } var gege = new Foo("hoge"); gege.method_a();
// Classぽく書く function Foo(hoge) { this.hoge = hoge; } Foo.prototype = { method_a: function() { console.log(this.hoge); }, method_b: function() { } } var gege = new Foo("hoge"); gege.method_a();