alert("Thing you want to alert")
You could add a 'window.' to the beginning of that, but you don't have to. It is very simple.
By comparison, to instead put your string into a paragraph of your site it requires
document.getElementById("ID").innerHTML = "Thing you want to place";
Now, that I'm experienced and I might want to get an element by its ID for reasons other than changing its innerHTML, it doesn't seem that complicated, but for the life of me when I was starting out I couldn't remember that code for the life of me. Honestly, I would rather have created a canvas, and used
ctx.fillText("Test to be filled", arbitrary number, arbitrary number);
So alert(), very useless, very annoying, very easy.