Make your own free website on Tripod.com
holow
Spencer Williams' Web Page dedicated to the anime show Bleach!!!

Chapter 1

Chapter 2

Chapter 3

Chapter 4

 
 
 
GoodAdd

The GoodAdd

<script>
//GoodAdd
//Demonstrates a potential pitfall
//Spencer Williams, 09/07

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

//get the cost of the meal from the user
meal = prompt("How much was the meal?");

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

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

<script>
//GoodAdd
//Demonstrates eval function
//Spencer Williams, 09/07

var meal;

//get the cost of the meal from the user
meal = prompt("How much was the meal?");

//convert the value to a number
meal = eval(meal);

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

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