Otwórz w trybie kompatybilności.

Kod

<!DOCTYPE html>
<html lang="pl">
<head>
    <meta charset="UTF-8">
</head>
<body>
    <script type="text/javascript">
        let r = parseInt(Math.random()*100)
        // Stare ↓
        // let r=parseInt(prompt("Podaj promień kuli:",""))
        let pole=4*Math.PI*Math.pow(r,2)
        let objetosc=4/3*Math.PI*Math.pow(r,3)
        document.write("<h3>Wartości:</h3><hr>")
        document.write("Promień kuli: ",r,"<br>")
        document.write("<h3>Wyniki:</h3><hr>")
        document.write("Pole Kuli: ",pole,"<br>")
        document.write("Objętość Kuli: ",objetosc,"<br>")
    </script>
</body>
</html>