evalis definitely not more efficient. Quite the opposite, actually. When you takeFunction.prototype.applyinto count, there's very few uses ofevalwhere there is not a better, more efficient solution.

Well, let's give you a feature comparison:

Numerical operators (unary positive:+; unary negative-; binary subtraction-; binary multiplicative*,/,%)

Gives a floating point result for an entire string. E.g. "08"-0 returns the number 8; +"1e6" returns the number 1000000; while 1*'1d6' returns the number NaN.Using the:Numberfunction

Gives the same results as the numerical operators, but might be easier to understand when they occur in the code.Using the:Numberconstructor

Gives a number object instead of a number primitive, but in all other aspects behaves like theNumberfunction.Using the:parseFloatfunction

Gives a floating point number for characters in the string up to the point where they may no longer be interpreted as floating point numbers. E.g. parseFloat("08") returns the number 8; parseFloat("1e6") returns the number 1000000; parseFloat("1d6") returns the number 1; parseFloat("0x1d6") returns the number 0 (Inconsistent, op7.5 returns 470); and parseFloat("d") returns the number NaN.Using the:parseIntfunction

Gives an integer number for characters in the string up to the point where they may no longer be interpreted as integer numbers. It also contains the same octal and hexadecimal autodetection system as theevalfunction and JavaScript numeric literals do. parseInt("1e6") returns the number 1; parseInt("08") returns the number 0; parseInt("0x1d6") returns the number 470; and parseInt("d") returns the number NaN