"eval" question
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
I may not be using it correctly, but here is what's happening....
eval("2 + 3") returns 5
Okay so far....
eval("2" + "3") returns 23
Seems strange, but I can live with that.
Now, here's the weird one:
eval("2 + 3" + "2 + 3") returns 37
Can anyone please explain WHY eval returns such an unexpected value? Is it a bug, or am I simply not understanding how it works?
Thanks
eval("2 + 3") returns 5
Okay so far....
eval("2" + "3") returns 23
Seems strange, but I can live with that.
Now, here's the weird one:
eval("2 + 3" + "2 + 3") returns 37
Can anyone please explain WHY eval returns such an unexpected value? Is it a bug, or am I simply not understanding how it works?
Thanks