Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The second argument (10) specifies you want to use a base 10 numbering system. It's unusual to use anything for this parameter except 10 and you should always specify it as the default is a bit unpredictable. (See, for example, http://www.w3schools.com/jsref/jsref_obj_global.aspImage Removed if you are interested as to why.)

If you need to have decimals then use parseFloat(). For example this script returns floating point values 1234.345 and 34.7 respectively into X:    

...