The variables following are defined through a Car prototype:
var Car = function(maker, type, model) {
this.maker = maker;
this.type = type;
this.model = model;
}
var golf = new Car('VW', 'Hatchback', 'Golf');
var sentra = new Car('Nissan', 'Sedan', 'Sentra');
var _328i = new Car('BMW', 'Convertible', "328i");
var gallardo = new Car('Lamborghini', 'Convertible', "Gallardo");
var corniche = new Car('Rolls Royce', 'Sedan', "Corniche");
Car.prototype.year = 0;
golf.year = 2015;
sentra.year = 2010;
_328i.year = 2019;
gallardo.year = 2020;
corniche.year = 1998;
How does one build an array of the var values for the property maker
Something that might console log like this:
(5) ['VW', 'Nissan', 'BMW', 'Lamborghini', 'Roll Royce']