Skip to content

completed all problems - #26

Closed
the-d-j wants to merge 5 commits into
bloominstituteoftechnology:masterfrom
the-d-j:master
Closed

completed all problems#26
the-d-j wants to merge 5 commits into
bloominstituteoftechnology:masterfrom
the-d-j:master

Conversation

@the-d-j

@the-d-j the-d-j commented Oct 8, 2017

Copy link
Copy Markdown

by Don Utley

Comment thread src/class.js
this.password = options.password;
}
comparePasswords(pwd) {
if (this.password === pwd) return true;

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 can do this with one line return this.password === pwd

Comment thread src/recursion.js
// return the nth number in the sequence
if (n === 0) return 0;
if (n === 1) return 1;
if (n === 2) return 2;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The first number in your Fib sequence will be 1, not 0, so you can use if (n < 2) return 1 in place of 6 and 7. If n >= 2, then return nFibonacci(n - 1) + nFibonacci(n - 2);

@sperrye sperrye 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 job

@sperrye sperrye closed this Oct 24, 2017
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