Created
November 27, 2017 13:37
-
-
Save seogi1004/be5d5db56e2e4ac5d5af15eb97c72573 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
var MyClass = function() { | |
this.show = function() { | |
return "MyClass"; | |
} | |
} | |
var MyStaticClass = new function() { | |
this.show = function() { | |
return "MyStaticClass"; | |
} | |
} | |
var cls = new MyClass(); | |
alert(cls.show()); | |
// -- 별도의 인스턴스 생성을 하지 않는다. | |
alert(MyStaticClass.show()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment