Repository navigation
Project Completed - #1
Merged
Merged
Conversation
ielvisd
approved these changes
Jan 18, 2019
ielvisd
left a comment
Collaborator
There was a problem hiding this comment.
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.
| // 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}`); |
Collaborator
There was a problem hiding this comment.
Good use of a string template literal
| // 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)) |
Collaborator
There was a problem hiding this comment.
Arrow functions looks good
| let BMWAndAudi =[]; | ||
| console.log(); | ||
| for(let i = 0; i < inventory.length; i++){ | ||
| if(inventory[i].car_make === 'BMW' || inventory[i].car_make === 'Audi'){ |
| this.email = email; | ||
| this.gender = gender; | ||
| } | ||
| speak() { |
Collaborator
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@ielvisd