Adding the float point numbers together : Float « Number Data Type « JavaScript Tutorial






<html>
<head>
<title>GoodAdd</title>
</head>
<body>
<script>
var meal;

meal = 123.45;

meal = eval(meal);

var tip = meal * .15;
var total = meal + tip;

alert ("the meal is $" + meal);
alert ("the tip is $" + tip);
alert ("Total bill: $" + total);
</script>
</body>
</html>








5.4.Float
5.4.1.Floating-Point Numbers
5.4.2.Floating-point values can be represented using e-notation
5.4.3.float point value
5.4.4.Adding the float point numbers together