Skip to content

Commit 113d685

Browse files
committed
translate "Named Function Expression" to ja
1 parent 8395ac3 commit 113d685

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎doc/ja/function/general.md‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@
2525

2626
しかし、コードの実行時にのみこの割り当てがされるため、`foo`という変数は対応するコードが実行される前にデフォルト値である[undefined](#core.undefined)が代入されるのです。
2727

28-
### Named Function Expression
28+
### 名前付き関数宣言
2929

30-
Another special case is the assignment of named functions.
30+
他に特殊なケースとして、命名関数があります。
3131

3232
var foo = function bar() {
33-
bar(); // Works
33+
bar(); // 動作する
3434
}
3535
bar(); // ReferenceError
3636

37-
Here `bar` is not available in the outer scope, since the function only gets
38-
assigned to `foo`; however, inside of `bar` it is available. This is due to
39-
how [name resolution](#function.scopes) in JavaScript works, the name of the
40-
function is *always* made available in the local scope of the function itself.
37+
この場合の`bar`は`foo`に対して関数を割り当てるだけなので、外部スコープでは使用できません。しかし、`bar`は内部では使用できます。これはJavaScriptでは[名前解決](#function.scopes)による動作です。関数名は*いつも*関数自体のローカルスコープ内で有効になっています。
4138

0 commit comments

Comments
 (0)