Skip to content

need to debug cuboid, finish arrays, and write 3 more functions in fun… - #1

Open
J-E-M wants to merge 2 commits into
masterfrom
Javon-McCoy
Open

J-E-M wants to merge 2 commits into
masterfrom
Javon-McCoy

Conversation

@J-E-M

@J-E-M J-E-M commented Mar 8, 2019

Copy link
Copy Markdown
Owner

…ctions.js

@J-E-M
J-E-M requested a review from wcolts2000 March 8, 2019 18:55
Comment thread challenges/classes.js
volume (width, height) {
return length * width * height;
}

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.

you had this area correct as we had our 1 on 1, can you push up the changes so i can merge. you had these without the parameters and with the this.length type syntax in the return

Comment thread challenges/functions.js

return `Hello ${firstName} ${lastName}, nice to meet you!`;

}

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 the template string here


let fullNames = zooAnimals.forEach(function(i){
animalNames.push(i.animal_name + " " + i.scientific_name);
});

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.

you could use a template string here to and not have to add in the extra space between the animal name and the scientific name

const largerPopulation = [];

let largerPopulation = zooAnimals.filter((species) => {
return species.population === "5";

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.

when you have only one parameter in the arrow function you can omit the ( ) around it like so... zooAnimals.filter( species => { return species.population === "5" }

Comment thread challenges/classes.js

surfaceArea(width, height) {
return (length * width + length * height + width * height);
}

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.

dont forget the 2 * ( ) in front of the return to get the area correctly here

@wcolts2000 wcolts2000 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.

once you push up the changes in the classes to match the prototype methods with the parameters is can merge this into the master branch for you

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