limit number of decimals js code example Example: limit numbers after decimal point in javascript var num = 5.56789; var n = num.toFixed(2);