Make your own free website on Tripod.com
 
Home
ActionScript
Blog

Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<script>
//nameGame
//plays around with user's name
//uses string methods

var firstName = "";
var lastName = "";
var numLetters = 0;

firstName = prompt("Hi, what's your name?");
alert ("That's a nice name, "+firstName+"");
alert ("I think I'll shout it:" + firstName.toUpperCase());
lastName = prompt("So what's your last name, " + firstName + "?");
alert ("Oh. "+firstName+" "+lastName+", "+firstName+"");
numLetters = firstName.length + lastName.length;
alert ("Did you know there are "+numLetters+" letters in your name?");

</script>