Skip to content

Sprint-Challenge--JavaScript - #244

Closed
mmargo10 wants to merge 3 commits into
bloominstituteoftechnology:masterfrom
mmargo10:master
Closed

Sprint-Challenge--JavaScript#244
mmargo10 wants to merge 3 commits into
bloominstituteoftechnology:masterfrom
mmargo10:master

Conversation

@mmargo10

Copy link
Copy Markdown

No description provided.

@indifferentghost indifferentghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great

Your syntax and understanding has greatly improved! I'm happy to see that you're using class syntax perfectly!

Requested Improvements

Relatively speaking I'd just suggest watching what variables you're using.

Questions

How do you feel about JS after you had time to mull over it for the weekend?

Rating: {1-3}

2

Comment thread src/challenges.js
class Cube extends CuboidMaker {
constructor(cubeValues) {
super(CuboidValues);
this.isCube = cubeValues.isCube;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You're defining cubeValues in the constructor, but passing CuboidValues to the super. I believe you're passing undefined.

Comment thread src/challenges.js
return `We have a cube!`;
}

return surfaceArea;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

returning surfaceArea is going to return undefined. You should probably returning something like 'We don't have a cube'.

Comment thread src/challenges.js
const each = (elements, cb) => {
// Iterates over a list of elements, yielding each in turn to the `cb` function.
// This only needs to work with arrays.
elements.forEach(cb);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While it wasn't explicitly stated in the instructions, the hope was to do each of these without using array methods.

Comment thread src/challenges.js

/* ======================== Class Practice ============================ */
CuboidMaker.prototype.surfaceArea = function () {
return `SurfaceArea: ${2 * (this.length * this.width + this.length * this.height + this.width * this.height)}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It doesn't look like you're closing this function fully. I don't see a matching curly bracket from the opening function.

@mixelpixel mixelpixel closed this Apr 20, 2018
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.

3 participants