Skip to content

shouldn't the constructor be passed instead? #4

Description

@maesitos

@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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions