how to fixed before decimal value in javascript code example Example: javascript fixed decimal var num = 5.56789; var n = num.toFixed(2);