Want to add the 2 number precision in javascript

0 votes
52 views
asked Jun 22, 2017 in java script by admin (8,135 points)

Want to add the 2 number presicion.

10000

Becomes

100.00

Thanks

1 Answer

0 votes
answered Jun 22, 2017 by anonymous
Hi

   Try the below code

str.substring(0,str.length-numberdecimal)+'.'+str.substring(str.length-numberdecimal);
...