> ## Documentation Index
> Fetch the complete documentation index at: https://blog.sumathi.dev/llms.txt
> Use this file to discover all available pages before exploring further.

#  Alert Prompt Confirm

* Alert
  * Opens a mini window with message

* Prompt
  * takes input as a string
  * second arg is a default value which will be aleray present in the text field
  * ```js theme={null}
      let a = prompt("Enter value of a ",900); 
    ```

* Confirm
  * Asks to confirm and sets true or false

* ***We should not use these in UI , use modals Instead***
  * extact location and look these are differnet in different browsers
  * These are old methods
  * Blocks the main execution thread , program doesnot continue to next line of code

* ```js theme={null}
    console.log("hello");
    alert("your script works");
    let a = prompt("Enter value of a ","900");
    a = Number.parseInt(a)
    let write = confirm("Do you want to write it to the page")
    if (write) {
        document.write(a)

    } else {
        document.write("please allow me to write")
    }
    alert("you enter datatype of " + (typeof (a)))
  ```
