Water Sunlight

軽量プログラミングの文法 - JavaScript/Python

ユーザ用ツール

サイト用ツール


js:object:namespace

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

次のリビジョン
前のリビジョン
最新のリビジョン 両方とも次のリビジョン
js:object:namespace [2021/05/24 13:42]
tanaka 作成
js:object:namespace [2021/05/25 09:11]
tanaka [名前空間]
行 8: 行 8:
  
 <sxh javascript;title:Example> <sxh javascript;title:Example>
 +// 名前空間の定義
 var Sunlight = Sunlight || {}; var Sunlight = Sunlight || {};
-Sunlight.Student = function(name){ /* クラスの定義 */ }+ 
 +Sunlight.Student = function(name){ /* クラスの定義 */ }
 var suzuki = new Sunlight.Student('suzuki'); var suzuki = new Sunlight.Student('suzuki');
 </sxh> </sxh>
js/object/namespace.txt · 最終更新: 2021/05/25 09:11 by tanaka