I have no idea how to do this? I\'m adding comma numbers, result is of course always a number with way too many digits after the comma. anyone?
This worked for me:
var new_number = float.toFixed(2);
Example:
var my_float = 0.6666 my_float.toFixed(3) # => 0.667