1
Answer

javascript

Photo of Prateek Kumar

Prateek Kumar

15y
1.9k
1
Please tell me about the prompt use in javascript
thanks
Prateek

Answers (1)

0
Photo of Rajeswari nathan
NA 274 20k 15y

Prompt is used to get the user input.
It will show the message and get the input from used.
Following is simple example for prompt
var MyName = prompt("Type your name", "Defaultvalue");
The first parameter is message and the second parameter is the default message.