Skip to content

Sprint-Challenge--JavaScript -- Borja soler - #1

Open
borjasolerme wants to merge 8 commits into
masterfrom
borja-soler
Open

borjasolerme wants to merge 8 commits into
masterfrom
borja-soler

Conversation

@borjasolerme

Copy link
Copy Markdown
Owner

@samarv
// Finished MVP plus stretch challenges

@borjasolerme
borjasolerme requested a review from samarv January 25, 2019 10:42

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

Project Overview

  • Self study Questions
  • Use the objects-arrays.js link to get started. Read the instructions carefully!
  • Use the functions.js link to get started. Read the instructions carefully!
  • Use the prototypes.js link to get started. Read the instructions carefully!
  • Use the classes.js link to get started. Read the instructions carefully!

Sprint

  • Extend the base class CuboidMaker with a sub class called CubeMaker. Find out the formulas for volume and surface area for cubes and create those methods using the dimension properties from CuboidMaker. Test your work by logging out your volume and surface area.

  • If you haven't already, convert your array method callbacks into arrow functions.

Conclusion

Hey Borja,

You did superb in this sprint. Here are a few things that went well -

  1. Your code is clean and well thought out.
  2. You went above and beyond to compete all stretch task
  3. Your git work flow is ada grade.

Here is a few thing you need to work on -

  1. You need to get more comfortable in answering questions in english. I know, english is your second language but I believe, that getting the point across in a well written format is worth the effort.

  2. You used the operators with parentheses. it's works but it's not very readable. which operator get's computed first? * or + Write your code in a way that's easy to comprehend

Keep working hard. Keep stretching. Programmer level ** 10000

if you have any questions, Don't fret to reach out to me.

Comment thread README.md
Global object (The window in browsers) when neither of the other cases is applied.

5. Why do we need super() in an extended class?
Is the keyword that allow us to 'refer'/'call' the class from which is inherit.

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.

The super() is used to access and call functions on an object's parent. When used in a constructor, the super keyword appears alone and must be used before the this keyword is used.

Comment thread challenges/classes.js
return (
2 *
(this.length * this.width +
this.length * this.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.

what you have done is fine but yo can/should also use brackets to mark the separation between 2 operator. so, it's easier to read. you can do something like

return 2 * ((this.length * this.width) + (this.length * this.height) + (this.width * this.height));

Comment thread challenges/classes.js
super(attributes, attributes, attributes);
}
volume() {
return Math.pow(this.length || this.height || this.width, 3);

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 can also use exponential operator ** to raise the power. so, you can also do something like

return this.length ** 3

Comment thread challenges/functions.js
* The last parameter accepts a callback
* In the body of the function return the callback with the two parameters that you created
*/
const consume = (param1, param2, cb) => cb(param1, param2);

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 use of arrow function. pretty neat.

console.log(lowerCase);
// const lowerCase = [];
// zooAnimals.map(function(animal) {
// lowerCase.push(animal.animal_name.toLowerCase());

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 can do something like

 let lowerCase = zooAnimals.map(function (animal) {
  return(animal.animal_name.toLowerCase())
}

You don't need to create a new array and push in items. Map by default returns an array.

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