什么是技术方法,以及SYNTAX实现原型继承 [英] What are the ways techniques, and SYNTAX to acheive prototypal inheritance

查看:77
本文介绍了什么是技术方法,以及SYNTAX实现原型继承的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

技术的方法是什么,以及SYNTAX实现原型继承的方法。我想要完整的继承方式。我们可以通过什么方式实现继承?我想这些是三种方式。解释和技巧?



What are the ways techniques, and SYNTAX to acheive prototypal inheritance. I want complete ways of inheritance. what are the ways we can acheive inheritance?? i guess these are three ways\syntax and techniques??

//first way 
myFunc.prototype= another.prototype;

//second way 
myfunc= object.create(another.prototype);

//third way 
myfunc= new another();
///while the functions are
function another()
{
}
function myFunc()
{
}

推荐答案

您可以参考以下链接..这是一个很好的解释提供



原型 [ ^ ]



即使你也可以参考这个



原型继承 [ ^ ]
You can refer below link..it's a nice explanation provided

prototypal[^]

even you can refer this also

prototypal inheritance[^]


这篇关于什么是技术方法,以及SYNTAX实现原型继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆