I need to figure a way to create a loop of can products for my clients’ shopping site.
Here is my work - https://codepen.io/Rosstopherrr/pen/GVRvxJ
I have a lot of functions, but was wondering am I right to think that I can create objects that all share the same basic structure? That way all my objects would look the same by having all the right properties and all my methods would be defined in one place.
Since I have different cans in different colours, I should start by looking up looping through an array, then how to fill an array with object constructors, right?
In my Codepen piece, it shows numbered slides that are empty (except the first slide, which shows the can) but the idea is to fill each slide with different can products.
I just want to know if I am heading in the right direction by looking through my code and cutting it down to simple and using DRY, and by doing this will allow me to create the loop of cans, so I don’t have to repeat my self.