fixed to one decimal javascript code example Example: javascript fixed decimal var num = 5.56789; var n = num.toFixed(2);