Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    Well, you have presented an example of how eval can be dangerous.  The accepted answer says that eval is dangerous, and this is documented widely, along with the warning that you shouldn’t, for example, allow a (possibly hostile or malicious) user specify a string that will be used in an eval statement without checking it thoroughly. The accepted answer also shows declare, so you don’t seem to be adding a lot of new information. Commented Jul 15, 2022 at 19:07
  • This answer helped me more than the accepted answer because of its simplicity. Commented Aug 5, 2022 at 14:21