Having trouble getting this to print anything in JSFiddle, although everything looks right to me. I'm unsure as to why HTML is not displaying the answer, but any help is welcome. Thanks!
HTML:
<h2>BMI Calculator</h2>
<p>
Enter your weight in pounds:
<input type="text" id="weight">
</p>
<p>
Enter your height in inches:
<input type="text" id="height">
</p>
<input type="button" onclick="bmiCalculator()" value="calculate">
<p id="output"></p>
Javascript:
function bmiCalculator() {
var weight = Number(document.getElementById("weight").value);
var height = Number(document.getElementById("height").value);
var finalWeight = weight * .45;
var finalHeight = height * .025;
var BMI = (finalWeight / Math.pow(finalHeight, 2));
document.getElementById("output").innerHTML = BMI;
}