My banner sliding function isn't working and the image paths are also not being recognized
var img = document.getElementById('img-banner');
var images = [
'../banners/banner.png',
'../banners/banner1.png',
'../banners/banner2.png'
];
var x = 0;
function slide() {
if (x > images.length) {
x++
} else {
x = 1;
}
img.innerHTML = "<img src ="+images[x-1]+">";
}
setInterval(slide, 5000);