Working through a Javascript tutorial and got to this example that is supposed to write some temperature conversions to the screen. This is the code straight from the tutorial and it doesn't work at all. Prints nothing to the screen. I can't find any error if there is one.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Chapter 3, Example 4</title>
</head>
<body>
<script>
var degFahren = [212, 32, -459.15];
var degCent = [];
var loopCounter;
for (loopCounter = 0; loopCounter <= 2; loopCounter++) {
degCent[loopCounter] = 5 / 9 * (degFahren[loopCounter] - 32);
}
for (loopCounter = 2; loopCounter >= 0; loopCounter−−) {
document.write("Value " + loopCounter +
" was " + degFahren[loopCounter] +
" degrees Fahrenheit");
document.write(" which is " + degCent[loopCounter] +
" degrees centigrade<br />");
}
</script>
</body>
</html>