Created
October 29, 2017 19:34
-
-
Save triacontane/7aa535650a5660229186941412d3a195 to your computer and use it in GitHub Desktop.
クラス(プロトタイプ)を作成するサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test() { | |
this.initialize.apply(this, arguments); | |
} | |
Test.prototype.initialize = function() { | |
this.aaa = 1; | |
}; | |
var t = new Test(); | |
console.log(t.aaa); // -> 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment