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

Advanced JS Project - #53

Closed
KingAtoki wants to merge 4 commits into
bloominstituteoftechnology:masterfrom
KingAtoki:master
Closed

Advanced JS Project#53
KingAtoki wants to merge 4 commits into
bloominstituteoftechnology:masterfrom
KingAtoki:master

Conversation

@KingAtoki

Copy link
Copy Markdown

No description provided.

@seanchen1991 seanchen1991 left a comment

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.

Nice job on this assignment! A few minor nitpicks. I would definitely encourage you to come back to this lab if you find yourself with some extra time between sprints and finish it up. These are all important foundation concepts.

Comment thread src/arrays.js
// Return the new array.
const newElements = [];
for (let i = 0; i < elements.length; i++) {
newElements.push(cb(elements[i], i, elements));

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.

No need to pass the elements array here.

Comment thread src/class.js
// for a potential password that will be compared to the `password` property.
// Return true if the potential password matches the `password` property. Otherwise return false.
// Return true if the potential password matches the `password` property. Otherwise return false.
if (potentialPassword === this.password) {

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 just one-line this with return potentialPassword === this.password;.

Comment thread src/this.js
this.username = options.username;
this.password = options.password;
this.checkPassword = (string) => {
if (string === this.password) {

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, you can just do return string === this.password;.

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