Prompt() Method
The prompt() method displays a dialog box that prompts the visitor for input. A prompt box is often used if you want the user to input a value before entering a page.
Syntax
prompt(text, defaultText)
Example: 1
Counting from var a to b using the prompt method.
Example: 2
Write a table using the prompt method.
Example: 3
Create a calculator