Apparently Number(“1234”) is the same as a shorthand version: +”1234”. Both of 
these will convert a string into a number and will give NaN if the string can 
not be converted to a logical number.

Performance-wise, different browsers seem to give different results as to which 
one is faster.

I think we should make it standard practice to use “+” instead of Number() for 
casting to Number in FlexJS. It will save 7 characters for every cast.

Harbs

Reply via email to