Skip to content

Commit 8395ac3

Browse files
committed
translate "The function Expression" in "Function" to ja
1 parent 96307ba commit 8395ac3

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

‎doc/ja/function/general.md‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,19 @@
1111
foo(); // このコードが動作する前にfooが作られているので、ちゃんと動作する
1212
function foo() {}
1313

14-
### The `function` Expression
14+
### `関数`式
1515

1616
var foo = function() {};
1717

18-
This example assigns the unnamed and *anonymous* function to the variable `foo`.
18+
この例では、`foo`という変数に無名で*匿名*の関数が割り当てられています。
1919

2020
foo; // 'undefined'
21-
foo(); // this raises a TypeError
21+
foo(); // これはTypeErrorが起こる
2222
var foo = function() {};
2323

24-
Due to the fact that `var` is a declaration, that hoists the variable name `foo`
25-
before the actual execution of the code starts, `foo` is already defined when
26-
the script gets executed.
24+
`var`は宣言である為に、変数名`foo`がコードが開始される実際の評価時より前のタイミングにまで巻き上げられています。`foo`は既にスクリプトが評価される時には定義されているのです。
2725

28-
But since assignments only happen at runtime, the value of `foo` will default
29-
to [undefined](#core.undefined) before the corresponding code is executed.
26+
しかし、コードの実行時にのみこの割り当てがされるため、`foo`という変数は対応するコードが実行される前にデフォルト値である[undefined](#core.undefined)が代入されるのです。
3027

3128
### Named Function Expression
3229

0 commit comments

Comments
 (0)