Skip to content

Usman Javed#45

Closed
ujaved931 wants to merge 4 commits intobloominstituteoftechnology:masterfrom
ujaved931:master
Closed

Usman Javed#45
ujaved931 wants to merge 4 commits intobloominstituteoftechnology:masterfrom
ujaved931:master

Conversation

@ujaved931
Copy link

@ujaved931 ujaved931 commented Apr 16, 2018

##JS1

  • objects.js

  • arrays.js

  • callbacks.js

  • Stretch Task

Good Habits

  • Pull Request title is your first and last name (add any notes in the comment field)
  • Code has been committed regularly
  • Commit comments are informative
  • Code is organized in a logical wa

// Once your objects are created, log out the following requests from HR into the console:

// Mitzi's name
console.log(companyIntern1.name)

Choose a reason for hiding this comment

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

Good job with this!

console.log(companyIntern5.multiplyNums(3,4));

// === Great work! === Head over to the the arrays.js file or take a look at the stretch challenge

Choose a reason for hiding this comment

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

Looks good!

// ==== Challenge 1 ====
// 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[33].car_year, inventory[33].car_make, inventory[33].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 that the index starts at 0 rather than 1 - so car 33 is actually at index 32.

console.log();

for(let i = 0; i < inventory.length; i++){
inventory[i].id;

Choose a reason for hiding this comment

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

This works without inventory[i].id;

}
}
console.log("this is the list of all bmw and audi cars: " + JSON.stringify(BMWAndAudi));

Choose a reason for hiding this comment

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

Using === may cause issues down the line with conflicting types, in this case == would be better.


}
}
console.log(oldCars.length);

Choose a reason for hiding this comment

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

Beautiful.

return cb(true);
}
}
return cb(false);

Choose a reason for hiding this comment

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

Awesome work.

Copy link

@nphillips78 nphillips78 left a comment

Choose a reason for hiding this comment

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

Great job overall! Looks like you are pretty comfortable with the concepts you're learning.

For reference:
https://developer.mozilla.org/en-US/docs/Glossary/Type_Conversion

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array (look under Accessing Array Elements)

Keep up the good work!

@mixelpixel
Copy link
Contributor

@ujaved931 I edited the task list in the first comment at the top ☝️

Now it shows up as a clickable list, AND in the main PR list, you have a progression bar next to your PR 😄

The diff was you had *[] and there need's to be a space in between the star any the brackets * []

@mixelpixel mixelpixel closed this May 21, 2018
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.

3 participants