The Name Game
<html>
<head>
<title>The Name Game</title>
</head>
<body>
<center>
<h1>The Name Game</h1>
<script>
//by Ryan Te
//9/18/07
//namegame
//plays around with the user's name
//uses string methods
var firstName = "";
var lastName = "";
var numLetters = 0;
firstName = prompt("Hi, what's your first 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 + ".");
alert ("Sometimes called " + lastName + "," + firstName);
numLetters = firstName.length + lastName.length;
alert ("Did you know there are " + numLetters + "letters in your name?");
</script>
</body>
</html>