const files = [];
let current = 0;
for (let i = 1; i <= 30; i++) {
    files.push(`(${i}).jpg`);
}

function changeSlide(val){
    current += val;
    if (current > files.length - 1) {
        current = 0;
    }
    if (current < 0) {
        current = files.length - 1;
    }
    document.getElementById("slided").src = `./IMG/${files[current]}`;
}