---
title: "Discussion on \"6. prompt and alert in JavaScript\" | Hashnode"
description: "Discussion on \"6. prompt and alert in JavaScript\". prompt Function:\nThe prompt function is used to display a dialog box that prompts the user for input. It takes two optional parameters:\n\nMessage (prompt text): A string that will be displayed as a message in the prompt dialog.\n\nDefault (default value..."
url: "https://hashnode.com/posts/6-prompt-and-alert-in-javascript/657fbd2d13a6eb94a3f3559b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [6\. prompt and alert in JavaScript](https://itchmyback.hashnode.dev/6-prompt-and-alert-in-javascript?utm_source=hashnode&utm_medium=feed)

prompt Function: The prompt function is used to display a dialog box that prompts the user for input. It takes two optional parameters: Message (prompt text): A string that will be displayed as a message in the prompt dialog. Default (default value...

Dec 18, 2023 · 2 min read · itchmyback.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#javascript-for-beginners](https://hashnode.com/tag/javascript-for-beginners)
-   [#learning-journey](https://hashnode.com/tag/learning-journey)

## Written by

[Shofique Rian](https://hashnode.com/@ItchMyBack)

@ItchMyBack

  
[View profile](https://hashnode.com/@ItchMyBack)

I have no cs Degree

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
