JavaScript Window alert()
JavaScript Window alert()
The alert() method is used to display an alert box with a message and an OK button. It is done in order to send information to the user. By doing this, we take the focus away from the current window and force the user to read the message.
Syntax:-
Its syntax is:- alert(message)
Further Explanation:-
ParameterDescription messageOptional. The text we want to display in the alert box.