In this example we show the two different ways of creating a number (one as an object and one as an ordinary number field) and we then use the toFixed method to do a comparison of the two numbers to two decimal places. That these two numbers are identically equal to two decimal places demonstrates that if you use Number methods that it doesn't matter which way you create the numbers. If you were to modify this code to assign the exact same value to both fields and then compare the fields directly rather than using the toFixed method then the two would not be equal because one is a Number object and the other is just a number.
var count1, count2, txt;
count1 = new Number(6.257);
count2 = 6.258;
if (count1.toFixed(2) === count2.toFixed(2))
txt = 'These values are equal to two decimal places.';