Skip to content

Simon Davis [JavaScript-I] - #80

Open
Skidragon wants to merge 7 commits into
bloominstituteoftechnology:masterfrom
Skidragon:master
Open

Simon Davis [JavaScript-I]#80
Skidragon wants to merge 7 commits into
bloominstituteoftechnology:masterfrom
Skidragon:master

Conversation

@Skidragon

Copy link
Copy Markdown

No description provided.

@holly-g holly-g left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great job, Simon!

Comment thread assignments/arrays.js
console.log(`Car 33 is a *car year goes here* *car make goes here* *car model goes here*` );
for(let i = 0; i < inventory.length; i++) {
if (inventory[i].id === 33) {
console.log(`Car 33 is a ${inventory[i].car_year} ${inventory[i].car_make} ${inventory[i].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.

This works with just the template literal, no for loop necessary, with an index of 32, not 33. Don't forget that the index starts at 0 instead of 1.

Comment thread assignments/arrays.js Outdated
oldCars.push(carYears[i]);
}
}
console.log(oldCars);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Don't forget you need to log its length.

Comment thread assignments/arrays.js
let BMWAndAudi =[];
console.log();
for(let i = 0; i < inventory.length; i++) {
if(inventory[i].car_make === 'BMW' || inventory[i].car_make === 'Audi') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider using loose equality == as opposed to strict equality ===.

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