Search code examples
javascriptnetsuitesuitescript

is there any other way than .toFixed() method, in suitlet to print a 2 decimal placed number as a 3 decimal place?


is there any way in suitlet to print a 2 decimal placed number as a 3 decimal place? (e.g, the value i have is 1300.12 and i want it to be printed as 1300.120). I have tried .toFixed(3) method but my suitlet is showing error.”


Solution

  • console.log(Number.parseFloat(1300.12).toFixed(3))