-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New index.js (tiny JS) for OOP Exercise #342
Changes from 1 commit
e62a175
943acc8
37c3130
b62f9a7
59760b4
75e81f2
c064a94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
// class Animal { | ||
// constructor (species, name, gender){ | ||
// this.species = species; | ||
// this.name = name; | ||
// this.gender = gender; | ||
// } | ||
// } | ||
|
||
class Entity { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
constructor (name, species, gender, saying){ | ||
this.name = name; | ||
|
@@ -24,7 +32,7 @@ class Human extends Entity { | |
} | ||
|
||
getProps (){ | ||
return super.getProp().concat([this.legs, this.hands]) | ||
return super.getProps().concat([this.legs, this.hands]) | ||
} | ||
} | ||
|
||
|
@@ -41,7 +49,7 @@ class Animal extends Entity { | |
} | ||
|
||
getProps (){ | ||
return super.getProp().concat([this.paws]) | ||
return super.getProps().concat([this.paws]) | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't keep comments in production code.
Exception: comments that explain reasons behind implementation peculiarities, that cannot be understood from the code itself (e.g. we cache data because server is down often and we want users to have some data anyways)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done