A javascript number type question -


why 1.tofixed(2) syntax error while

var = 1; a.tofixed(2)  

won't.

moreover, why 1.1.tofixed(2) run alright?

1. starts float 1.tofixed() incorrect syntax. use (1).tofixed() though.

1.1.tofixed() works fine because after 1.1 in float parser won't take . beginning of float object method call.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -