Skip to content
This repository was archived by the owner on Aug 31, 2019. It is now read-only.

advanced.js complete - #42

Closed
pikapoo92 wants to merge 7 commits into
bloominstituteoftechnology:masterfrom
pikapoo92:master
Closed

pikapoo92 wants to merge 7 commits into
bloominstituteoftechnology:masterfrom
pikapoo92:master

Conversation

@pikapoo92

Copy link
Copy Markdown

No description provided.

Comment thread src/arrays.js
let truthy;
for (let i = 0; i < elements.length; i++) {
if (cb(elements[i])) {
truthy = elements[i];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can streamline this by just having if cb(elements[i]) return elements[i];.

Comment thread src/recursion.js
// fibonacci sequence: 1 2 3 5 8 13 ...
// return the nth number in the sequence
if (n===1)
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's try to keep the formatting of your braces consistent.

Comment thread src/this.js

const me = new User({ username: 'LambdaSchool', password: 'correcthorsebatterystaple' });
const result = me.checkPassword('correcthorsebatterystaple'); // should return `true`
console.log(result);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Make sure to get rid of console logs when you commit your code.

Comment thread src/this.js
return this.password === passwordToCompare;
};

console.log(checkPassword("blorp"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same thing here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants