Want to add the 2 number precision in javascript

0 votes
39 views
asked Jun 22 in java script by admin (8,115 points)

Want to add the 2 number presicion.

10000

Becomes

100.00

Thanks

1 Answer

0 votes
answered Jun 22 by anonymous
Hi

   Try the below code

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