adding two decimal numbers in javascript function code example
Example 1: javascript snumber two decimal places as string
let money = 1.6;
money.toFixed(2); // 1.60
Example 2: javascript round to 2 digits
var num = 2;
var roundedString = num.toFixed(2);// 2.00