I’m not sure why jason.quantity comes back as undefined when I run it through console.log. Can anyone help? It’s supposed to return a random number 1 - 10. Here is the code…
// Create a constructor for Album object
function Album(title, artist, price){
this.title = title;
this.artist = artist;
this.price = price;
date = new Date();
quantity = Math.floor((Math.random() * 10) + 1);
};
var jason = new Album("Freebird", "Jason Delgado", 19.99);
console.log(jason.quantity);