+ 1
Why exactly do we need to use this alert ??
3 ответов
+ 3
Is this related to the Tutorials/Lessons? I mean...which alert?
In general it's just:
alert("Message to show visitors");
You can also concatenate values:
var x =3;
alert("The variable x is set to: " + x);
+ 2
Yeah, following @Andrew G...: Alerts stop events on the main thread. They are 'modal' windows and disruptive.
https://en.m.wikipedia.org/wiki/Modal_window
"...[they] create a mode that disables the main window..."
I try to use them as minimally as possible: debug and deliberate interruption.