I have some code
{{if commission}}
<td>${profit - commission}</td>
{{else}}
<td>${profit}</td>
{{/if}}
profit = 5
;
commission = 2.145
result = 2.855999999999
I need 2.856
Please help me
I try to use (${profit - commission}).toFixed(2)
- but it does not work.
Use simply toFixed(3)
.it will select the 3 digits value after the dot value
var s=2.855999999999;
alert(s.toFixed(3))
OP
: 2.856