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

Comments

All complete, not all passing#47

Closed
darkness198 wants to merge 2 commits intobloominstituteoftechnology:masterfrom
darkness198:master
Closed

All complete, not all passing#47
darkness198 wants to merge 2 commits intobloominstituteoftechnology:masterfrom
darkness198:master

Conversation

@darkness198
Copy link

No description provided.

// newCounter(); // 2
let count = 0;
return () => {
count++;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just do return count++; here.


return {
increment: () => {
count++;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same with increment and decrement.

// this method should take in a string and compare it to the object's password property
// return `true` if they match, otherwise return `false`
checkPassword(str) {
if (str === this.password) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you can just do return str === this.password;.

// use `this` to access the object's `password` property.u
// do not modify this function's parameters
// note that we use the `function` keyword and not `=>`
if (this.password === passwordToCompare) {
Copy link
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