updating js, split class and object list into new file

This commit is contained in:
Nye Evans 2021-01-01 17:48:27 +00:00
parent 400f5c6f0c
commit c2b724a81b
3 changed files with 23 additions and 12 deletions

View file

@ -1,13 +1,7 @@
class slide{
constructor(title, caption, image){
this.title = title;
this.caption = caption;
this.image = image;
}
}
import {slide} from "GalleryIndex.js";
import {slides} from "GalleryIndex.js";
var currentSlide = 0;
var slides = [1, 2, 3, 4, 5, 6, 7] //generic info, placeholder
function nextSlide(){
@ -27,5 +21,5 @@ function updateSlide(){
currentSlide = slides.length;
}
console.log(currentSlide);
console.log(slides[currentSlide]);
}