-1
In javascript, I try to run programs in the browser that do calculations between numbers and generate a multi-line output, but it leaves everything in a single line when running the command. I tried to put ' n' at the end of each line, I tried to put ' ' and I tried to concatenate, but in the output of the browser, it’s all together in a single line. Someone would know how to solve?
<script>
var n1 = window.prompt('Digite um numero: ')
var n2 = window.prompt('Digite outro numero: ')
num1 = parseFloat(n1)
num2 = parseFloat(n2)
soma = num1 + num2
document.write(`A soma dos números foi igual a ${soma}`)
document.write('Muito obrigado')
</script>