<script type="text/javascript">
/* calcular a media de 4 notas */
var n1 = 10
var n2 = 10
var n3 = 10
var n4 = 10
var media = (n1+n2+n3+n4)/4
document.write("Sua média:", media);
</script>
Next, I wanted to use the Prompt mdn to enter variables instead of leaving them predefined.
I also wanted to create a function to type predefined texts instead of using document.write()
all the time.
I'm a beginner, if you can help me, thank you!