Home
ActionScript
Blog

Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Project Three


<script>
var answer = "2";
var guess = "0";
var score = 0;

guess=prompt("What number comes after 1?");

if (guess == "2")
{
alert("correct");
score++;
}
else
{
alert("wrong");
}

alert("Your score is "+score+"");

guess=prompt("What is the programmer's name?");

if (guess == "catherine")
{
alert("correct");
score++;
}
else
{
alert("wrong");
}

alert("Your score is "+score+"");

guess=prompt("What color is the sky normally?");

if (guess == "blue")
{
alert("Correct.");
score++;
}
else
{
alert("Wrong.");
}

alert("Your score is "+score+"");

guess=prompt("What time does school start?");

if (guess == "8:05")
{
alert("correct");
score++;
}
else
{
alert("wrong");
}

alert("Your score is "+score+"");

guess=prompt("Does Catherine like math?");

if (guess == "no")
{
alert("correct");
score++;
}
else
{
alert("Yeah, right.");
}

alert("Your score is "+score+"");

</script>