File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ 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+ However, ` eval ` only executes in the local scope when it is being called
15+ ** directly ** * and * when the name of the called function is actually ` eval ` .
1616
1717 var foo = 1;
1818 function test() {
@@ -35,14 +35,13 @@ in the global scope since `eval` is not being called directly in that case.
3535
3636### Security Issues
3737
38- ` eval ` also is a security problem as it executes ** any** code given to it,
38+ ` eval ` also is a security problem. Because it executes ** any** code given to it,
3939it should ** never** be used with strings of unknown or untrusted origins.
4040
4141### In Conclusion
4242
43- ` eval ` should never be used, any code that makes use of it is to be questioned in
43+ ` eval ` should never be used. Any code that makes use of it is to be questioned in
4444its workings, performance and security. In case something requires ` eval ` in
45- order to work, its design is to be questioned and should ** not** be used in the
46- first place, a * better design* should be used, that does not require the use of
47- ` eval ` .
45+ order to work, it should ** not** be used in the first place.
46+ A * better design* should be used, that does not require the use of ` eval ` .
4847
You can’t perform that action at this time.
0 commit comments