Skip to content

Commit fcf8b57

Browse files
committed
2 parents 70f5ad7 + d62ef39 commit fcf8b57

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

doc/ja/core/eval.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Why Not to Use `eval`
1+
## なぜ、`eval`を使ってはいけないのか
22

3-
The `eval` function will execute a string of JavaScript code in the local scope.
3+
`eval`関数はローカルスコープ中のJavaScriptコードの文字列を実行します。
44

55
var foo = 1;
66
function test() {
@@ -11,8 +11,7 @@ The `eval` function will execute a string of JavaScript code in the local scope.
1111
test(); // 3
1212
foo; // 1
1313

14-
But `eval` only executes in local scope when it is being called **directly** *and*
15-
the name of the called function is actually `eval`.
14+
しかし、`eval`**直接**ローカルスコープから呼ばれて、*かつ*呼んだ関数の名前が実際の`eval`でないと実行しません。
1615

1716
var foo = 1;
1817
function test() {
@@ -24,9 +23,8 @@ the name of the called function is actually `eval`.
2423
test(); // 2
2524
foo; // 3
2625

27-
The use of `eval` should be avoided at **all costs**. 99.9% of its "uses" can be
28-
achieved **without** it.
29-
26+
`eval`の使用は**全てのコスト**を払ってでも回避するべきです。その「使用法」の99.9%で、これ**無し**でも実装できます。
27+
3028
### `eval` in Disguise
3129

3230
The [timeout functions](#other.timeouts) `setTimeout` and `setInterval` can both

0 commit comments

Comments
 (0)