Round to two decimal places - Javascript

Round to two decimal

Snippet Code


  
Rate this page :
  [ 0 votes]

Use Math.Round() to round to two decimal places as,

Math.Round((result)*100)/100 for eg, function result(){ var test = 20.3456*234.67; var res = Math.Round((test)*100)/100 }

Tags


Ask Questions

Ask Question