Definition:
If you use this function in a program, it displays a message on the screen.>/p>
It shows the message inside a pop-up box, and you can close it by pressing the OK button.
Syntax:
alert("Your message here");
Example:
alert("Welcome to www.edutation.com");
Output:
When you press the OK button, the pop-up box shows the message:
Welcome to www.edutation.com
