function Car(image, make, model, description, price, category, year, mileage, extras) { this.image = image; this.make = make; this.model = model; this.description = description; this.price = price; this.category = category; this.year = year; this.mileage = mileage; this.extras = extras; } Car.prototype.generateImage = function(elt) { const img = document.createElement('img'); img.src = this.image; img.alt = this.make + " " + this.model; img.classList.add('card-img-top'); elt.appendChild(img); };