Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS-II P1 #233

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

JS-II P1 #233

wants to merge 2 commits into from

Conversation

kkhaag
Copy link

@kkhaag kkhaag commented Mar 22, 2018

No description provided.

Copy link

@indifferentghost indifferentghost left a comment

Choose a reason for hiding this comment

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

Great

Your code is clean. You seem to have a great understanding of the fundementals of JavaScript.

Requested Improvements

I'd pay attention to the tests, your code looks awesome; however, it seems to be the little implementations to work on postincement vs. preincrement.

Questions

none

Rating: {1-3}

2

this.age = options.age;
}
growOlder() {
return this.age++;

Choose a reason for hiding this comment

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

So, this should increment age before returning it.

const nFactorial = (n) => {
// factorial example: !5 = 5 * 4 * 3 * 2 * 1
// return the factorial of `n`
if (n === 0 || n === 1) {
return 1;

Choose a reason for hiding this comment

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

Should just return n instead.

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