Skip to content

Conversation

@Steveno95
Copy link

No description provided.

carModels.push(inventory[i].car_model);
}
carModels.sort();
console.log(carModels);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just include the sort in the console.log
console.log(carModels.sort());

for (let i = 0; i < carYears.length; i++) {
if (carYears[i] < 2000) {
oldCars.push(carYears[i]);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could include an else statement here.

console.log();

for (let i = 0; i < inventory.length; i++){
if (inventory[i].car_make === 'BMW' || inventory[i].car_make === 'Audi'){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like your use of the OR operator here.

speak : function() {
console.log("Hello, my name is Susan");
},
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep up the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants