File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change 22
33端的に言って、JavaScriptの関数やその他の要素は` DontDelete ` 属性が設定されているので、グローバル変数を消去する事は* 不可能* です。
44
5- ### Global code and Function code
5+ ### グローバルコードと関数コード
66
7- When a variable or a function is defined in a global
8- or a [ function scope] ( #function.scopes ) it is a property of either
9- Activation object or Global object. Such properties have a set of attributes,
10- one of these is ` DontDelete ` . Variable and function declarations in global
11- and function code always create properties with ` DontDelete ` , therefore
12- cannot be deleted.
7+ 変数や、関数がグローバルまたは[ 関数スコープ] ( #function.scopes ) で定義された時は、そのプロパティは有効なオブジェクトかグローバルオブジェクトになります。このようなプロパティは属性のセットを持っていますが、それらの内の1つが` DontDelete ` になります。変数や関数がグローバルや関数コードで宣言されると、常に` DontDelete ` 属性を作るために、消去できません。
138
14- // global variable :
15- var a = 1; // DontDelete is set
9+ // グローバル変数 :
10+ var a = 1; // DontDelete属性が設定される
1611 delete a; // false
1712 a; // 1
1813
19- // normal function :
20- function f() {} // DontDelete is set
14+ // 通常関数 :
15+ function f() {} // DontDelete属性が設定される
2116 delete f; // false
2217 typeof f; // "function"
2318
24- // reassigning doesn't help :
19+ // 再代入も役に立たない :
2520 f = 1;
2621 delete f; // false
2722 f; // 1
You can’t perform that action at this time.
0 commit comments