js/app.js
// constructor (the way you know it is a constructor is by the capital letter for the function name)
constructor (the way you know it is a constructor is by the capital letter for the function name)
constructor ( the way you know it is a constructor is by the capital letter for the function name )
function Product(name, fileExtension = 'jpg') {
    this.name = name;
    this.src = `img/${name}.${fileExtension}`;
    this.votes = 0;
    this.views = 0;
    allProducts.push(this);
}
function Product ( name , fileExtension = 'jpg' ) { this . name = name ; this . src = ` ${ name } ${ fileExtension } ` ; this . votes = 0 ; this . views = 0 ; allProducts . push ( this ) ; }
constructor (the way you know it is a constructor is by the capital letter for the function name)
constructor ( the way you know it is a constructor is by the capital letter for the function name )
//the jpg is adding a default value using the last item in the list. //properties // name // file path // votes // views // push object instances into products(empty) array