I cant find a good solution for my fist java script class. Can someone help me here. The result is not showing up here.
<script language = "JavaScript">
document.write('<center><h3>-- Myname 23 -- ')
myDate = new Date ();
document.write(myDate.toLocaleString());
document.write('</h3></center><hr>');
</script>
<script language = "JavaScript">
// Add, subtract, multiply, and divide
var firstvar;
var secondvar;
var resultvar;
// Add 23.5 and 15
document.write ('adding 23.5 and 15
');
firstvar=23.5;
secondvar=15;
resultvar
document.write(firstvar);
document.write('
');
document.write(secondvar);
document.write('
');
document write('---');
document.write('
');
resultvar = firstvar + secondvar;
document.write(resultvar);
document.write('
');
// Subtract 45 from 10
document.write ('subtracting 45 from 10
');
firstvar=10;
secondvar=45;
document.write(firstvar);
document.write('
');
document.write(secondvar);
document.write('
');
document.write('---');
document.write('
');
resultvar= firstvar - secondvar;
document.write(resultvar);
document.write('
')
// Multiply 2.5 by 15
document.write ('multiplying 2.5 by 15
')
firstvar=2.5
secondvar=15
document.write(firstvar);
document.write('
');
document.write(secondvar);
document.write('
');
document.write('---');
document.write('
');
resultvar= firstvar * secondvar;
document.write(resultvar);
document.write('
');
// Divide 144 by 12
document.write ('dividing 144 by 12
');
firstvar=144;
secondvar=12;
document.write(firstvar);
document.write('
');
document.write(secondvar);
document.write('
');
document.write('---');
document.write('
');
resultvar= firstvar / secondvar;
document.write(resultvar);
document.write('
');
</script>