0

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)
}
sindre
  • 1
  • 1
    `left=random(0, screen.width)` is part of a literal string. You’re not using your function at all there. – Sebastian Simon Dec 07 '21 at 10:52
  • [window features of `window.open`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#window_features) does not seem to allow JavaScript. – evolutionxbox Dec 07 '21 at 10:53

0 Answers0