Skip to content

Anna townsend - #1

Open
AnnaTownsend9916 wants to merge 3 commits into
masterfrom
Anna-Townsend
Open

AnnaTownsend9916 wants to merge 3 commits into
masterfrom
Anna-Townsend

Conversation

@AnnaTownsend9916

Copy link
Copy Markdown
Owner

No description provided.

Annatownsend9916 added 2 commits March 8, 2019 13:10

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

You're on the cusp for these first two files! Take note of the feedback I provided and keep working hard. You can do it!

// Using your dinosaur objects, log answers to these questions:


const tyrannosaurus = {

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.

Excellent work defining your objects!

console.log(tyrannosaurus.period);


// Create a new roar method for the tyrannosaurus. When called, return "RAWERSRARARWERSARARARRRR!" Log the result.

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.

Be sure to add the roar method. Refer to past projects if you're stuck, and if you still can't figure it out, reach out to me!

const animalNames = [];
console.log(animalNames);
let names = zooAnimals.forEach(function(i){
zooAnimals.push(i.scientific_name + i.animal_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.

I don't think that you will want to push this information into the zooAnimals array. Look around and see if there is another array that has been defined that would be a better place to put these names.

Comment thread challenges/objects-arrays.js Outdated
*/

const lowerCase = [];
const lowerCase = animalNames.map((zooAnimal) => {

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.

Excellent work here!

Comment thread challenges/objects-arrays.js Outdated
const largerPopulation = [];
console.log(largerPopulation);
// const largerPopulation = zooAnimals.filter((pop) => {
// return pop.zooAnimals === 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.

Do each of your objects in the zooAnimals array have a property called zooAnimals? Also, right now you are checking if that is equal to five, while it asks for the animals with a population less than five.

Comment thread challenges/objects-arrays.js Outdated
console.log(populationTotal);
// */
// const populationTotal = zooAnimals.reduce(zooAnimals, pop) => {
// return zooAnimals + pop.zooAnimals;

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.

Very very close here! This is the same issue with the last problem - does each element in your array have a zooAnimals property? If not, what property does it have that would work here?

Comment thread challenges/prototypes.js
Create a constructor function named CuboidMaker that accepts properties for length, width, and height
*/

function CuboidMaker(props) {

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.

Excellent work here!

Comment thread challenges/prototypes.js Outdated
*/

CuboidMaker.prototype.volume = function() {
return volume;

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.

Volume is not defined here - this function should calculate the volume based on the formula given above.

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