what are the benefits of being familiar with the prototype chain in actual development?
what are the benefits of object-oriented implementation and direct implementation
what are the benefits of being familiar with the prototype chain in actual development?
what are the benefits of object-oriented implementation and direct implementation
encapsulates some routines for dealing with problems, and the reuse method
can inherit
, which is the engineering ability of abstracting complex problems into a relatively simple model. Prototype chain is a concrete implementation of javascript language for object-oriented. So, in popular terms, it may be useful when you solve complex problems; if it is simple, it is up to you to use it or not.
as mentioned above, it doesn't matter if you don't understand prototype chain when implementing simple functions, but when writing complex applications, moderate use of prototype chain can simplify code, decouple engineering, and encapsulate interfaces.
familiar with the meaning of the prototype chain, I think it is to understand the design intention of the js author, and the underlying engine will maximize the syntax of the author's design
if one person writes, the function can be realized
the group can write code, which requires a standard, a writing method that everyone must abide by and agree with, and the code structure is clear. Oop is one of the writing methods that everyone follows
Previous: Pycharm mysql database error report
Next: What plug-ins are recommended when developing React-Native with WebStorm?
1. I am working on an app project, and there are many onclick events in the project. I have an idea to use the touch event instead, because there are a lot of things that need to be modified. I wonder if it can be easily implemented, binding an implem...
take a look at the prototype and just add an attribute to the object. If the object needs this property, can t you just add it at the beginning of creation? If you need this property for an instance, you might as well refine the subclass and add the att...