In this tutorial you will learn how to give users notification using the alert() and prompt() method.
One of the most common information boxes that you will encounter most especially if you are inserting something in a database and there will be a prompt that you have successfully inserted that item.
MESSAGE - (OPTIONAL) Specifies the text you want to display or an object that will be converted to a string and displayed when called.
Another one is the prompt() method that lets you ask your user to input something. This is an alternative if you don't want to create a modal.
TEXT - (REQUIRED) The text you want to display when called.
DEFAULT TEXT - (OPTIONAL) The default input value.
<script> var answer = prompt("What is your name"); alert("Your name is: " +answer); </script>
Base from the code above, we have a variable answer in which it stores whatever the use inputs on the the prompt.