1decimal.toFixed();
2// return 6
3
4decimal.toFixed(2)
5// returns 5.68
6
7decimal.toFixed(1)
8// return 5.7
1const number // Some Decimal Number
2const decimal = number - Math.floor(number)
3//implementation
4const number = 3.78;
5const decimal = 3.78 - (Math.floor(3.78)) // Math.floor(3.78) returns 3
6// decimal is 0.78
7