Adding the float point numbers together : Float : Number Data Type JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Number Data Type » Float »

 

Adding the float point numbers together

















<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>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Number Data Type
» Float