Javascript examples for Data Type:Float
Get value only from float
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w w w.j a va 2s. c o m var num1 = '0.76544'; var num2 = '0.76432'; num1 = parseInt(num1.replace(/\./, '')); num2 = parseInt(num2.replace(/\./, '')); console.log(num1 - num2); } </script> </head> <body> </body> </html>