Friday, 27 September 2013

Undesired result using eval on divide

Undesired result using eval on divide

The code
eval("7/2")
yields the result 3. I would prefer that it returned 3.5. How can I
achieve this please?

No comments:

Post a Comment