当前位置:网站首页>JS prototype chain object function relationship
JS prototype chain object function relationship
2022-06-30 06:03:00 【Handsome big black】
A picture is worth a thousand words , Let's first understand a picture

Prototype and prototype chain understanding
Every object has a __proto__ The pointer , The prototype object that defaults to its constructor prototype(
Prototype object prototype Of construstor Property points to the constructor itself), because prototype Also have __proto__ Continue to look up the prototype object of the constructor , Form a prototype chain . The final __proto__ Point to Null
.
Function And Object Relationship
Personal understanding : Object.prototype It's the top
Prototype object,Object.prototype Constructed Function.prototype.Function.prototype Construct out Function and Object. There are many disputes on the Internet . Only personal understanding (All things are objects)
Related topics
> console.log(Function instanceof Object) //true
> console.log(Object instanceof Function) //true
> console.log(Object.__proto__ === Function.prototype) //true
> console.log(Function.__proto__.__proto__ === Object.prototype;) //true
> // Understand the picture above , None of this should be a problem 罒 ω 罒
边栏推荐
猜你喜欢

How does WPS cancel automatic numbering? Four options

Finally someone can make the server so straightforward

MySQL 索引

MySQL高级SQL语句

Swoole process model diagram

UE4_ Editor development: highlight the UI making method according to the assets dragged by the mouse (1)

86. separate linked list

【LeetCode】236. Nearest common ancestor of binary tree

MySQL日志管理、数据备份、恢复

PC viewing WiFi password
随机推荐
Voting vault: a new primitive for defi and Governance
Xctf attack and defense world crypto advanced area
SparseArray
Do you know how to show the health code in only 2 steps
[road of system analyst] collection of wrong topics in Project Management Chapter
Codeforces B. MEX and Array
Strlen and sizeof, array length and string length, don't be silly
luoguP2756 飞行员配对方案问题(最大流)
【数据库】事务
Sword finger offer 18 Delete the node of the linked list
Summary of redis learning notes (I)
Share problems solved
[OSPF] comparison between rip and OSPF
【学习强化学习】总目录
Codeforces C. Andrew and Stones
What indicators should safety service engineers pay attention to in emergency response?
Beauty of Refactoring: when multithreaded batch processing task lifts the beam - Universal scaffold
Gestion des utilisateurs de la base de données MySQL
MySQL index
ES6数组遍历与ES5数组遍历