Hola aquí les comparto mi código
<meta charset="UTF-8">
<h1>PROGRAMA PARA CALCULAR IMC</h1>
<script>
function jumpLine() {
document.write("<br><br><br>")
}
function print(frase) {
document.write(frase);
jumpLine();
}
function calcularImc(weight,height) {
return(weight / (height * height));
}
name = prompt("Informe su Nombre");
weightInfo = prompt(name + " Informe su Peso");
heightInfo = prompt(name + " Informe su Altura");
imcCalculated = calcularImc(weightInfo,heightInfo);
print(name + " el imc calculado es: " + Math.round(imcCalculated));
</script>