Skip to content

Katie felten -MVP - #1

Merged
maks112v merged 5 commits into
masterfrom
katie-felten
May 9, 2019
Merged

maks112v merged 5 commits into
masterfrom
katie-felten

Conversation

@katie-rose

Copy link
Copy Markdown
Owner

No description provided.

@katie-rose
katie-rose requested a review from maks112v May 6, 2019 22:55
Comment thread assignments/arrays.js
// ==== Challenge 1 ====
// The dealer can't recall the information for a car with an id of 33 on his lot. Help the dealer find out which car has an id of 33 by logging the car's year, make, and model in the console log provided to you below:
console.log(`Car 33 is a *car year goes here* *car make goes here* *car model goes here*` );
let filterredArray = inventory.filter((car) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You would also just do interpolation to get the car.

Comment thread assignments/arrays.js
return false;
})

console.log(`Car 33 is a ${inventory[32].car_year} ${inventory[32].car_make} ${inventory[32].car_model}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Like this but above

Comment thread assignments/arrays.js
console.log();


console.log(`Car 50 is a ${inventory[49].car_make} ${inventory[49].car_model}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

For this they want the last car dynamically
lastCar=inventory.length-1; console.log(Last car make: ${inventory[lastCar].car_make}, model: ${inventory[lastCar].car_model});

@maks112v
maks112v merged commit 8c7ee11 into master May 9, 2019
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