Library API
    Preparing search index...

    Function prompt

    • Displays a native browser prompt dialog, asking the user for input.

      Parameters

      • msg: any

        The message/question to display

      • Optionaldflt: any

        An optional default value for the input field

      Returns string | null

      The text entered by the user, or null if cancelled

      const name = prompt('What is your name?', 'Guest');