什么是技术方法,以及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()
{
}