Showing posts with label eval. Show all posts
Showing posts with label eval. Show all posts

Thursday, May 10, 2012

What"s the better practice: eval or append script?


I need to execute a custom piece of JavaScript I got from some AJAX call. I could do an eval of the string or I could just append it in a script -tag to the DOM. Which method would be better?