Skip to content

april martinez#48

Closed
april7229 wants to merge 3 commits intobloominstituteoftechnology:masterfrom
april7229:master
Closed

april martinez#48
april7229 wants to merge 3 commits intobloominstituteoftechnology:masterfrom
april7229:master

Conversation

@april7229
Copy link

No description provided.

Copy link

@enitchals enitchals left a comment

Choose a reason for hiding this comment

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

Great job with this, April! You're developing good JS fundamentals. Please let me know if there are any particular concepts you want to review!


// ==== Challenge 3 ====
let lastCar = inventory[inventory.length-1];
console.log("Make: " + lastCar.car_make + ", Model: " + lastCar.car_model);

Choose a reason for hiding this comment

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

Nice work assembling this!

// find cars older than the year 2000 => Condition
if (inventory[i].car_year < 2000) {
// return old cars in oldCar array
oldCars.push(inventory[i].car_year); // pushed over and over

Choose a reason for hiding this comment

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

Using comments like this effectively turns your old code into easy-access reference material for future projects, which is awesome!

BMWAndAudi.push(inventory[i].car_make)
}

}

Choose a reason for hiding this comment

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

The only thing you're missing is a line using JSON.stringify() (which turns a JS object/array into a string) and console.log() to print the result.

function contains(item, list, cb) {
// contains checks if an item is present inside of the given array/list.
// Pass true to the callback if it is, otherwise pass false.
if(list.include(item)) {

Choose a reason for hiding this comment

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

Very close -- the method is includes :)

@mixelpixel mixelpixel closed this May 21, 2018
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.

3 participants