<script>
function Person(name) {
this.name = name;
}
Person.prototype.kind = 'person'
var zack = new Person('Zack');
console.log(zack.__proto__ == Person.prototype); //=> true
console.log(zack.__proto__ == zack.prototype) //=> false
</script>
Question:
why this line: console.log(zack.__proto__ == zack.prototype)
shows false? I checked online about the difference between __proto__
and prototype
, but it is quite complex, still do not understand. Anyone can give me a simple and clear explantion? Thanks.