A
Axolotl
Guest
why does this code not work correctly?
hopefully by reading it you will get the idea of what it is supposed to do (it is very basic java)
<html>
<SCRIPT lANGAUGE= "JavaScript">
//inputting data, using variables and doing arithmetic
var name1, name2, age1, age2, averageAge;
name1 = prompt("What Is Your First Name?","Steve");
age1 = parselnt(prompt("What Is This Age?","21"));
name2 = prompt("What Is Second Name?","Steve");
age2 = parselnt(prompt("What Is This Age?","21"));
averageAge = (age1+age2)/2
document.write("average age of "+ name1 +"and"+name2);
document.write("is" + averageAge);
alert("Hopefully You Know The Average Age Of "+ name1 +"and "+ name2 +" now!!");
</SCRIPT>
</html>
hopefully by reading it you will get the idea of what it is supposed to do (it is very basic java)
<html>
<SCRIPT lANGAUGE= "JavaScript">
//inputting data, using variables and doing arithmetic
var name1, name2, age1, age2, averageAge;
name1 = prompt("What Is Your First Name?","Steve");
age1 = parselnt(prompt("What Is This Age?","21"));
name2 = prompt("What Is Second Name?","Steve");
age2 = parselnt(prompt("What Is This Age?","21"));
averageAge = (age1+age2)/2
document.write("average age of "+ name1 +"and"+name2);
document.write("is" + averageAge);
alert("Hopefully You Know The Average Age Of "+ name1 +"and "+ name2 +" now!!");
</SCRIPT>
</html>