<!DOCTYPE html>
<html>
<body>
<p>Click the button to parse different strings.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo1"></p>
<p id="demo2"></p>
<script>
function myFunction() {
var f = parseFloat("398.02");
var g = parseFloat("372.00");
var x = f+g ;
var z = f-g ;
document.getElementById("demo1").innerHTML = x;
document.getElementById("demo2").innerHTML = z;
}
</script>
</body>
</html>