Skip to content

Project Completed - #1

Merged
ielvisd merged 1 commit into
masterfrom
seun-olorunwunmi
Jan 18, 2019
Merged

ielvisd merged 1 commit into
masterfrom
seun-olorunwunmi

Conversation

@seunx

@seunx seunx commented Jan 16, 2019

Copy link
Copy Markdown
Owner

@seunx
seunx requested a review from ielvisd January 16, 2019 05:35

@ielvisd ielvisd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great job on the stretch. Take a look the changes I suggested to your class constructor so that Challenge bloominstituteoftechnology#3 logs out correctly. Great work Seun.

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();
console.log(`Last car make: ${inventory[lastCar].car_make}, model: ${inventory[lastCar].car_model}`);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good use of a string template literal

Comment thread assignments/arrays.js
// The accounting team needs all the years from every car on the lot. Create a new array from the dealer data containing only the car years and log the result in the console.
let carYears = [];
console.log();
inventory.forEach(el => carYears.push(el.car_year))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Arrow functions looks good

Comment thread assignments/arrays.js
let BMWAndAudi =[];
console.log();
for(let i = 0; i < inventory.length; i++){
if(inventory[i].car_make === 'BMW' || inventory[i].car_make === 'Audi'){

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice concise solution

Comment thread assignments/objects.js
this.email = email;
this.gender = gender;
}
speak() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Try this

class Intern {
  constructor (id, email, name, gender){
  this.id = id;
  this.name = name;
  this.email = email;
  this.gender = gender;
  
  this.multiplyNums = function(x,y){
    return (x*y);
  }

  this.speak = function() {return `Hello my name is ${this.name}`};

  }
}

It fixes your class methods so that your console.logs for challenge bloominstituteoftechnology#3 work correctly.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Thanks Elvis

@ielvisd
ielvisd merged commit cafb5bd into master Jan 18, 2019
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