Comment Comment by matthewaveryusa Here's a really good use of eval:https://jsfiddle.net/matthewaveryusa/e6EKV/6/I could have done this without an eval if I decided to write an interpreter. Instead I whitelisted a subset of javascript and evaled it -- I believe the code is simpler with the eval than if I were to write a parser + interpreter.I challenge anyone to escape my whitelisting :) parent matthewaveryusa 8 years ago
https://jsfiddle.net/matthewaveryusa/e6EKV/6/
I could have done this without an eval if I decided to write an interpreter. Instead I whitelisted a subset of javascript and evaled it -- I believe the code is simpler with the eval than if I were to write a parser + interpreter.
I challenge anyone to escape my whitelisting :)