2 ms·
JavaScript eval: direct vs. indirect call
- viebel 10y agoEvery javascript developer knows that eval is evil. But eval is really powerful and from a theoretical perspective eval is very interesting. For instance, did you ever ask yourself in what context does eval run? This article features live & interactive code snippets.
- jepler 10y agoexample 1: yes, ok example 2: umm ok example 3: WAT
- viebel 10y agoIn javascript (1, eval) returns eval. But this is indirect. This is why `eval` runs in the outer scope. The whole point of this article is to demonstrate how weird is `eval`.