Skip to content

Mitchell Robles - JavaScript-I#313

Open
mitchellr92 wants to merge 4 commits into
bloominstituteoftechnology:masterfrom
mitchellr92:master
Open

Mitchell Robles - JavaScript-I#313
mitchellr92 wants to merge 4 commits into
bloominstituteoftechnology:masterfrom
mitchellr92:master

Conversation

@mitchellr92

Copy link
Copy Markdown

Completed all tasks and challenges as well as stretch goals.

@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 🎉
  • Completed Assignment
  • Stretch Problem

Great Work! 👏

Comment thread assignments/arrays.js
let lastCar = 0;

for (let i = 0; i < inventory.length; i++) {
if (inventory[i] === 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.

could have done something like:

lastCar = inventory[inventory.length - 1];
console.log(lastCar.car_make, lastCar.car_model);

Comment thread assignments/arrays.js
if (inventory[i].car_make === "BMW") {
BMWAndAudi.push(inventory[i]);
} else if (inventory[i].car_make === "Audi") {
BMWAndAudi.push(inventory[i]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also could have used the || operator

Comment thread assignments/objects.js
antonietta.multiplyNums = function multiplyNums(x, y) {
const sum = x * y;
return sum;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also possible to define methods inside the objects themselves

Comment thread assignments/objects.js

parent.child.grandchild.speak = function speak() {
return "Hello, my name is " + this.name + "!";
}

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 including the stretch problem

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