I'm trying to round off the decimal. Below are the scenarios
Entered Value - 56.6
Round off Value - 57
Entered Value - 56.7
Round off Value - 57
Entered Value - 56.8
Round off Value - 57
But same thing when i try to round of 56.3/56.2/56.4
, same value is displaying.
When i try 56.1
to 56.4
, i'm getting the same value itself. But when i try from 56.5
to 56.9
value is rounding off to 57
Entered Value - 56.3
Round off Value - 56.3
Expected Value - 57
i've tried below code to round of
parseFloat(value).toFixed();
Math.round(value)
How to actually execute all the scenarios of to round off?