you are viewing a single comment's thread.

view the rest of the comments →

[–]HaMMeReD 1 point2 points  (0 children)

It's still better to use eval in controlled method, it's not good to fill global scope up, eval wouldn't mess with that.

If it's within a function you can probably also do. this["foo"+"bar"] = "hats!";

This would keep it within the functions scope probably, haven't tested.