Post your trick

To display 2 decimal after , Javascript

to display 2 decimal after any number use toFixed() function of javascript
eg. var num = 25;
alert(num.toFixed(2));
it will give 25.00 instead of only 25


Leave a Reply

     

     

     

Post A Trick !

How does "Kodetricks" work?

We at kodeplay like to share knowledge. With Kodetricks, even you can join us. All you need to do is post a programming related trick if you have one or rate a trick if you like someone else's.



Find us on

Technology

Contact Us