PROMPT

Display a text field to get input from the user and a callback to respond to the result

Parameters

title String (required) - A short title for the alert

message String (required) - The message content for the alert

callback function (required) - invoked when the message box is dismissed

Examples

PROMPT('Please enter the current year', function (result) {
  if (result.input === new Date().getFullYear()) {
    // Correct
  } else {
    // Incorrect
  }
});