javascript - Extend objects using functional invocation pattern. How? -


field here:

I'm reading the book of Crockford and wondering what a proven approach is Can the child's objects be used to open the base constructor object and avoid adding an option to it?

I thought I could use the prototype of my object and it appears that my current code is not possible.

You have several errors:

  • Your Constructor Function Completely Returns unrelated objects. Do not do this this (if a return statement does not exist, then the constructor stays on it)
  • Super Constructor calls in JS very comfortable You are not ugly creation MySuperclass.call (this, arg1, arg2, ...); is needed, in your case breast cal (this, spec); cat class
  • In order to immediately trigger the object using the prototype series, you need the new keyword.

    See for a certain version of your code.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -