Created
September 6, 2014 01:08
-
-
Save mikamikuh/7d3e2fce5a76df7ef82a to your computer and use it in GitHub Desktop.
ネットや書籍を使わずにjavascriptを学ぶ ref: http://qiita.com/mikamikuh@github/items/091de83ffbd1fde1cc06
This file contains hidden or 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 Person = function(name, age) { | |
| this.name = name; | |
| this.age = age; | |
| }; | |
| var one = new Person("Mikami", 27); | |
| var two = new Person("Hoge", 50); | |
| console.log(one.name); | |
| console.log(one.age); | |
| console.log(two.name); | |
| console.log(two.age); |
This file contains hidden or 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
| Mikami | |
| 27 | |
| Hoge | |
| 50 |
This file contains hidden or 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(global) { | |
| var Fuga = {}; | |
| ... | |
| global['Fuga'] = Fuga | |
| })(this); |
This file contains hidden or 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 Fuga = {}; | |
| ... | |
| this['Fuga'] = Fuga |
This file contains hidden or 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 Person = function(name, age) { | |
| this.name = name; | |
| this.age = age; | |
| }; | |
| ... | |
| var Adult = {}; | |
| var Person = {}; | |
| ... | |
| this['Adult'] = Adult; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment