Skip to content

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

Open
chillingtonbillington wants to merge 2 commits into
bloominstituteoftechnology:masterfrom
chillingtonbillington:master
Open

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

Conversation

@chillingtonbillington

Copy link
Copy Markdown

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

@John-Spraul John-Spraul 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.

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

Great work! 🎉

Comment thread Blank
@@ -0,0 +1 @@

Copy link
Copy Markdown

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? 🤣

Comment thread assignments/arrays.js
// 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];

Copy link
Copy Markdown

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

Comment thread assignments/arrays.js
let carModels = [];
console.log();
for (let i = 0; i < inventory.length; i++){
console.log(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.

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

Comment thread assignments/objects.js
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));

Copy link
Copy Markdown

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