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

Not finished yet#23

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

Not finished yet#23
firefaded wants to merge 2 commits intobloominstituteoftechnology:masterfrom
firefaded:master

Conversation

@firefaded
Copy link
Copy Markdown

Only completed class.js and es6.js so far

Copy link
Copy Markdown
Contributor

@seanchen1991 seanchen1991 left a comment

Choose a reason for hiding this comment

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

Nice, clean code. I would also add that you should consistently write function() instead of function () with a space after the function keyword. It's an aesthetic convention and doesn't actually have a reason behind it, but keeping your code consistent is also important.

}

User.prototype.comparePasswords = function (currentPassword) {
if (currentPassword === 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.

Just wanted to point out that you can shorten this to return currentPassword === this.password;. It's not wrong to do it the way you did, just letting you know about some other ways to do it.

constructor(options) {
this.age = options.age;
this.growOlder = function () {
return this.age;
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.

Should this be return this.age++;? I'm just going off the name of the function.

@SunJieMing SunJieMing closed this Sep 1, 2017
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.

3 participants