Here is the loop
for (let i = 0; i < 13; i++) {
var randomval = random(0, screen.height)
var myWindow = window.open("", ("MsgWindow", i), "width=200,height=100,top=0, left=random(0, screen.width)");
myWindow.document.write("<p>TROLOLOLOLOLOLOLOLOL</p>");
This is the "random" function it calls to
function random(min, max) { // min and max included
return Math.floor(Math.random() * (max - min + 1) + min)
}