The prompt method of the window object is used to render a dialog box that requests text needed to proceed with a particular action that the script is about to perform. It also gives the user the ability to cancel the action if they wish to.
Parameters
messageToUser
Message that appears above the input text field in the box.
defaultValue
Optional default value pre-inserted into the input text field in the box.