Skip to content

[sukhada gholba] JavaScript-I#66

Open
sukhadagholba wants to merge 5 commits intobloominstituteoftechnology:masterfrom
sukhadagholba:master
Open

[sukhada gholba] JavaScript-I#66
sukhadagholba wants to merge 5 commits intobloominstituteoftechnology:masterfrom
sukhadagholba:master

Conversation

@sukhadagholba
Copy link

No description provided.

// 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*` );

console.log("Car 33 is a "+ inventory[32]["car_year"]+" "+ inventory[32]["car_make"]+" "+inventory[32]["car_model"]);
Copy link

Choose a reason for hiding this comment

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

good use of referencing the index keeping in mind arrays start at 0.

let lastCar = 0;
console.log();
lastCar = inventory.length-1;
console.log("Make for the last car is "+inventory[lastCar]["car_make"]+" "+"and Model for the last car is "+inventory[lastCar]["car_model"]);
Copy link

Choose a reason for hiding this comment

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

This looks good. You may want to look into string literals, it will make your life easier.

//console.log(antonietta.multiplyNums(3,4));

intern5.multiplyNums = function(a,b){
return (a*b);
Copy link

Choose a reason for hiding this comment

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

This is technically accurate, however, its best practices to leave spaces between elements. i.e. return (a * b).

@bdurb
Copy link

bdurb commented May 22, 2018

@sukhadagholba thank you for the PR. Great work today, you are doing well with these concepts.

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