このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン | 最新のリビジョン 両方とも次のリビジョン | ||
js:object:namespace [2021/05/24 13:42] tanaka [名前空間] |
js:object:namespace [2021/05/25 09:11] tanaka [名前空間] |
||
---|---|---|---|
行 8: | 行 8: | ||
<sxh javascript; | <sxh javascript; | ||
+ | // 名前空間の定義 | ||
var Sunlight = Sunlight || {}; | var Sunlight = Sunlight || {}; | ||
+ | |||
Sunlight.Student = function(name){ /* クラスの定義 */ } | Sunlight.Student = function(name){ /* クラスの定義 */ } | ||
var suzuki = new Sunlight.Student(' | var suzuki = new Sunlight.Student(' | ||
</ | </ |