alert and document.write()
Cant we use expressions like, alert("Hello World!"); document.write("Hello World!"); at the same time?
Steven Parker203,238 Points
Sure, you can do both of those.
Those do two different things, one writes to the document (the "page"), and the other pops up a dialog box.
Just be aware than until you dismiss the dialog box, the program won't finish and the page won't actually be rendered. So no matter which order you do them, the pop-up will be seen first.