
Splatty-doo and Other JavaScript Features You Should Avoid - JSJ 543
JavaScript Jabber
00:00
Should Eval Be Avoided?
Eval takes a string and then porses and executes that string as javascript. It has access to all the local variables, not just the globels. The big problem with eval is the fact that it's potentially really unsafe. And beyond that, the fact that evil exists within a function precludes the jabscript engine from optimizing that function. But can highly optimized functions that you useeval to attach to an object slow you down? Ya, if jipete can optimise that function in this case, but that's no longer becausas i explained it in such a technical way.
Transcript
Play full episode