prompt()

Term side of the Card
Topic: Output Information
Unit title: prompt()
Categories: Method
Explanation side of the Card

Explanation: The browser API method that displays a dialog box prompting the user for input. It returns the input value as a string or `null` if the user cancels.

Browser compatibility:
  • The chrome browser supports this feature starting from version 1
  • The edge browser supports this feature starting from version 12
  • The firefox browser supports this feature starting from version 1
  • The safari browser supports this feature starting from version 1
Availability: