Page 50 - JavaScript
P. 50
This will log the following to the console:
End Note
For more information on the capabilities of the console, see the Console topic.
Using window.alert()
The alert method displays a visual alert box on screen. The alert method parameter is displayed
to the user in plain text:
window.alert(message);
Because window is the global object, you can call also use the following shorthand:
alert(message);
So what does window.alert() do? Well, let's take the following example:
alert('hello, world');
In Chrome, that would produce a pop-up like this:
https://riptutorial.com/ 7

