- Visual Studio Code
- Mozilla Firefox
Note: Any Browser will do, though Google Chrome or Mozilla firefox are recommended.
prompt-example // name of the folder --index.html --app.js
Running the Code
If you are using Visual Studio code then you can simply make use of ‘live-server’ extension which updates the code in real-time. Try entering different details(ages):
Name: Mukul Age: 22
Name: Ram Age: 18
Name: Sneha Age: 61
The above example gives you an idea about how we can make use of prompt/alert/confirm. Though this example is simple, it can still be modified in many ways. I want you to try implementing your own example.
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.