Randomiseur du tableau de dossier JavaScript

    // Made By RashidYT
    
    // just like array randomizer but we will get the folder to get the images
    var selectedfolder = "/img/";

    // selects the <img> tag
    var image = document.getElementById("selected-image")

    // this is the array that will contain the images
    var images = [
        selectedfolder + "1.png",
        selectedfolder + "2.png",
        selectedfolder + "3.png",
    ]

    // finally. the image will be randomized when the page is loaded
    image.src = images[Math.floor(Math.random() * images.length)];
RashidYT