as @balajive mentioned.
but ! ;D ... actually a lot of libs do it anyway .... otherwise you can not parse and bootstrap injected script tags for example.
or you could use function http://stackoverflow.com/questions/20129236/creating-functions-dynamically-in-js
but in general don't overuse eval. I try to avoid is as often as I can, but sometimes you need to write selfgenerating code where eval comes in handy.