Prompt troubles | Sololearn: Learn to code for FREE!
+ 2

Prompt troubles

How do I get the answer of one prompt into another piece of code?

7th Jun 2018, 9:08 PM
Z & K
4 Réponses
+ 6
Please specify this question
8th Jun 2018, 1:30 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 4
Assign the prompt answer into a variable? I'm not really understanding your question, what do you mean get it into another piece of code?
7th Jun 2018, 9:21 PM
+ 3
What I think you mean is getting a answer from prompt and sending that answer somewhere else in your code, in that case put the answer in a variable like this var input = prompt("..."); Then you can choose how to send that result e.g. a function argument or something like that
7th Jun 2018, 9:21 PM
TurtleShell - avatar
+ 2
Z & K I did not understand your question.
7th Jun 2018, 9:15 PM
Ulisses Cruz
Ulisses Cruz - avatar