Jump to content

eval()


davej

Recommended Posts

I don't think a good program would ever need to use it. Except maybe browser that don't support JSON.parse(), but I did build my own JSON.parse() function once just for the experience in order to avoid the use of eval().

 

Actionscript used to have eval() and they removed it in ActionScript 3, so they know eval is useless.

Link to comment
Share on other sites

  • 2 weeks later...

For some things we have our server sending blocks of Javascript code to the browser, that's really the only time I would use it. Eval is better in that situation than creating a new script element with the code and adding it to the page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...