2
<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 type variables, instead of leaving them preset.
I also wanted to create a function to type some predefined texts, instead of using document.write()
all the time.
I’m a beginner, if you can help me, thank you!
My, very good! I would never imagine doing something like this, very fucking! I was impressed my... I didn’t know what const was, but I’m doing the homework here.
– MSHijo
I think it’s incredible that you answer in a way that I never imagined.
– MSHijo
Thank you very much, I will study about const!
– MSHijo
@Mshijo I’m glad I helped. If the answer solved your problem you can mark as accepted. And if you want you can use
var
but read about it: https://answall.com/a/206121/129– Sergio
Never use! haha I laughed kk...
– MSHijo
and I used a lot in the code... Thank you so much for helping!
– MSHijo