Skip to content
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

shouldn't the constructor be passed instead? #4

Open
maesitos opened this issue Oct 13, 2016 · 0 comments
Open

shouldn't the constructor be passed instead? #4

maesitos opened this issue Oct 13, 2016 · 0 comments

Comments

@maesitos
Copy link

maesitos commented Oct 13, 2016

@davidflanagan in examples/09.12.SingletonSet.js line: 11, shouldn't SingletonSet be passed to extend instead of SingletonSet.prototype ?

Additionally if extend is defined like this:
Function.prototype.extend = function(){}
shouldn't it be used with Set.extend instead of Set.prototype ?

So, from this:

// Now add properties to the prototype.
// These properties override the properties of the same name fro
Set.prototype.extend(SingletonSet.prototype, {...

To this

// Now add properties to the prototype.
// These properties override the properties of the same name fro
Set.extend(SingletonSet.prototype, {...

I don't know if it's an error or it's something I don't get from the chapter. This has been driving me nuts for a couple of days! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant