Skip to content

Object and Array assgnmient for Javascript I, Robert Billington#280

Open
chillingtonbillington wants to merge 2 commits intobloominstituteoftechnology:masterfrom
chillingtonbillington:master
Open

Object and Array assgnmient for Javascript I, Robert Billington#280
chillingtonbillington wants to merge 2 commits intobloominstituteoftechnology:masterfrom
chillingtonbillington:master

Conversation

@chillingtonbillington
Copy link

First assignment for Javascript using Arrays and Objects. PM @John-Spraul.

Copy link

@John-Spraul John-Spraul left a comment

Choose a reason for hiding this comment

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

  • Git stuff (more than one commit 😮)
  • Completed assignment

Great work! 🎉

@@ -0,0 +1 @@

Choose a reason for hiding this comment

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

Lol, was this just for an extra commit? 🤣

// The dealer needs the information on the last car in their inventory. What is the make and model of the last car in the inventory? Log the make and model into the console.
let lastCar = 0;
console.log();
let lastCar = inventory[inventory.length - 1];

Choose a reason for hiding this comment

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

can use const, since it is not reassigned later

let carModels = [];
console.log();
for (let i = 0; i < inventory.length; i++){
console.log(inventory[i].car_model);

Choose a reason for hiding this comment

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

don't forget to remove console.logs that you don't need

console.log(kennan.speak());
// Antonietta loves math, give her the ability to multiply two numbers together and return the product. Use the console.log provided as a hint.
//console.log(antonietta.multiplyNums(3,4));
console.log(antoinetta.multiplyNums(3,4));

Choose a reason for hiding this comment

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

can also define method here, using antoinetta.multiplyNums = (a,b) => {...

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