-
Notifications
You must be signed in to change notification settings - Fork 11
Part1 - constructors and prototypes #5
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
base: master
Are you sure you want to change the base?
Part1 - constructors and prototypes #5
Conversation
- follow directions more closely
joshdmiller
left a comment
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.
The only thing I'd comment here is that this includes features not in the original test and that have no tests of their own. E.g. passing a parameter into the various speak functions.
src/index.js
Outdated
| // - I didn't understand what this was at first, but it's in the tests... | ||
| // - so, I have to give each constructor a 'constant' I guess... | ||
| // - "On the contrary... It is in uppercase because that's a common convention for constants defined on the constructor rather than on the prototype." | ||
| // - I still don't see the helpfulness of the all caps but I'm sure it's with reason to avoid some confusion |
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.
The all caps is pure convention, probably a hold-over from an older language. If you look at languages like Java and C, constants are defined in all caps by convention. Even though these are not technically constants (JavaScript has no such feature), we list them in all caps to signify our intent.
|
So, this is without the added parameter being passed to speak. Seem good? |
I wrote this over again to see If I could remember. How does it look?