javascript - How to understand the sentence that the constructor is the unique identifier of the prototype? What's the meaning
phpcn_u1582
phpcn_u1582 2017-05-19 10:14:57
0
1
455

How do you understand the sentence that the constructor is the unique identifier of the prototype? What's the meaning

phpcn_u1582
phpcn_u1582

reply all (1)
为情所困

Why are you talking all these nonsense? . . . . That is to say, the position of an object in the prototype chain depends entirely on the function. This is the only thing that comes to my mind that may be correct. The prototype chain is actually composed of theprototype属性构成的链表,一个对象通过原型链继承其他的属性。可能因为这是一个构造函数的prototypeattribute of the function, so that's what he said. But this is really not necessarily right, for example

function fn(){} function fn2(){} fn2.prototype=fn.prototype; a = new fn(); fn.prototype = {}; console.log(a instanceof fn) // false console.log(a instanceof fn2) // true

About the prototype chain, take a look at this: http://zonxin.github.io/post/...

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!