typescript rounding numbers code example
Example 1: round up number typescript
var n = 4.3;
alert(Math.ceil(n)); //alerts 5
Example 2: round to nearest decimal javascript
round(456.7, 2).toFixed(2) // "456.70"
var n = 4.3;
alert(Math.ceil(n)); //alerts 5
round(456.7, 2).toFixed(2) // "456.70"