Hello. Writing Java is new to me, and I've been reviewing this code for awhile and I can't find what's different than my text book. Why won't it work? I want a sum to compute after the user types in two integers. I've even gone as far a counting the characters in each line--everything is the same. Thank you.
<script type = "text/javascript">
<!--
var firstNumber; // first string entered by user
var secondNumber; // second string entered by user
var number1; //first number to add
var number2; //second number to add
var sum; //sum of number1 and number2
// read in first number from user as a string
firstNumber = window.prompt("Enter first integer" );
// read in secondnumber from user as a string
secondNumber = window.prompt("Enter second integer" );
//convert numbers from strings to integers
number1 = parseInt( firstNumber );
number2 = parseInt( secondNumber );
sum = number1 + number2; // add the numbers
//display the results
document.writeIn( "<h1>The sum is " + sum + "</h1>");
// -->
</script>