Just print the variable, without anything else, you only use quotation marks to put a text, if you want a symbol of the code to be solved and used its value then it should appear direct. There is even how to put a variable inside the quotes but this is more advanced and does not work in all versions, so it is better not to use for now.
function funcao() {
var quantidade = prompt("Digite valor do saque");
alert(quantidade);
}
funcao();
If you want to print a text and the variable can make a simple concatenation:
function funcao() {
var quantidade = prompt("Digite valor do saque");
alert("O valor digitado é " + quantidade);
}
funcao();
I put in the Github for future reference.
This answers your question? Javascript programming
– Gato de Schrödinger
Did any of the answers solve your question? Do you think you can accept one of them? Check out the [tour] how to do this, if you haven’t already. You would help the community by identifying what was the best solution for you. You can accept only one of them. But you can vote on any question or answer you find useful on the entire site (when you have enough score).
– Maniero