You can create three kinds of message boxes in JavaScript: warning box, confirmation box, and prompt box.
JavaScript alert()
Syntax:alert("sometext");
at Use the alert command in JavaScript to create a message warning box: