Math.floor(Math.random() * (max - min) ) + min;
<html>
<body>
<script>
document.write("Hello World!")
</script>
</body>
</html>
Hello World!

</script>
<script src="GIFGroover.js"></script>
<script>
const myGif = GIFGroover();
myGif.src = "images/a24.gif";
ctx.drawImage( myGif.image,0,0);
ctx.drawImage( myGif.image,0,0,70,70);

const currentDate = new Date();
const milliseconds = currentDate.getMilliseconds();
const currentDate2 = new Date();
const milliseconds2 = currentDate2.getMilliseconds();
text="mil2-mil1: " + (milliseconds2-milliseconds);
ctx.font = "20px" + " "+"Consolas" ;
ctx.fillStyle = "black";
ctx.fillText(text, 3, 15);
const myGif1 = GIFGroover();
myGif1.src="../images/gif/a1.gif";
const myGif2 = GIFGroover();
myGif2.src="../images/gif/a24.gif";
x = canvas.width;
myObstacles_gif_1.push(new component_gif(17,17,myGif1 , x, 252));
myObstacles_gif_2.push(new component_gif(25,25,myGif2, x, 146));

function component_gif(width, height ,groove, x, y) {
this.groove=groove;
this.width = width;
this.height = height;
this.x = x;
this.y = y;
this.update = function() {
ctx.drawImage( this.groove.image,this.x,this.y,this.width,this.height);
}
}









