- 1、本文档共22页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Prototype的深度探索(国外英文资料)
Prototype的深度探索(国外英文资料)
Prototype depth exploration [rotation]
1 what is prototype?
The prototype property of the object in JavaScript can return a reference to the prototype of the object type. This is a very difficult to explain, to understand it, first to correctly understand the object type (Type) and prototype (prototype) concept.
As we said, the class of the object (Class) and object (Instance) is a kind of create relationship, so we put the class as the modeling object features, and object as specific features, or that the class (Class) is a type of object (Type). For example, in the previous example, the types of P1 and P2 are Point, and in JavaScript, this can be verified by the instanceof operator:
P1 instanceof Point
P2 instanceof Point
However, the only type Point is not P1 and P2, because P1 and P2 are object, so Obejct is their type, because Object is more general than the Point class, so we say that there is a derivative of the relationship between Obejct and Point, we would know that behind this relationship is called inheritance. A special case of generalization it is also a relationship between the object, is a basic relation in object oriented indispensable.
In object oriented domains, instances and types are not unique and can be described by abstract relationships. In JavaScript, another important abstract relationship is Type and prototype. This relationship is a higher level of abstraction that happens to consist of a chain of three layers with the abstract relationship of type and instance, as described in the figure below:
//TODO:
In real life, we often say that something is created from another thing as a prototype. These two things can be of the same type or of different types. Idioms yihuhuhuapiao, here is the prototype and the gourd is gourd, type, use JavaScript prototype to say is .Prototype = a dipper gourd or gourd gourd (.Prototype= new).
In order to understand the prototype, the research on it can be a kind of design pattern -- prot
您可能关注的文档
最近下载
- 机房接地电阻测试记录.doc VIP
- 获得性血友病A诊断与治疗中国指南(2021年版).pdf VIP
- 2025年天津武清中考语文试题及答案.doc VIP
- H13钢的高温拉伸性能研究.pdf VIP
- 04D201-3室外变压器安装图集.pdf VIP
- Agentic RAG 的现在与未来.pdf VIP
- T_ZZB 3718—2024(纸质卡牌_标准).pdf VIP
- 建筑材料行业研究简报:华东水泥创新高,巨石业绩持续高增长.pdf VIP
- 东风风神-AX4-产品使用说明书-风神AX4 2017款 1.4T DCT潮尚型-DFM7141F3B-AX4使用手册201710.pdf VIP
- 工程设计项目拟投入设计人员及设备.docx VIP
文档评论(0)