当前位置:网站首页>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 罒 ω 罒
边栏推荐
- Solidity - Security - reentrancy attack
- Beauty of Refactoring: when multithreaded batch processing task lifts the beam - Universal scaffold
- Feisheng: Based on the Chinese word breaker ik-2 ways to build custom hot word separators Showcase & pit arrangement Showtime
- Master slave synchronization of MySQL database to realize read-write separation
- Create priority queue
- [database] transaction
- 一个完整的性能测试流程
- How to automatically renew a token after it expires?
- SHELL
- Golang's handwritten Web Framework
猜你喜欢

Golang's handwritten Web Framework

I have been working as a software testing engineer for 5 years, but I was replaced by an intern. How can I improve myself?

Prototype and prototype chain in JS

Mysql database learning notes - foreign keys, table connections, subqueries, and indexes for MySQL multi table queries

Develop stylelint rules from zero (plug-ins)

Finally someone can make the server so straightforward

STM32F103 series controlled OLED IIC 4-pin

Use of OpenCL thread algebra library viennacl

Huxiaochun came to fengshu electronics to sign a strategic cooperation agreement with Zoomlion

Official win 10 image download
随机推荐
Implementation of property management system with ssm+ wechat applet
MySQL advanced (Advanced SQL statement)
Master slave synchronization of MySQL database to realize read-write separation
飞升:基于中文分词器IK-2种自定义热词分词器构建方式showcase & 排坑showtime
[GPU] basic operation
1380. lucky numbers in matrices
ES6箭头函数
数据读写:Unity中基于C#脚本实现数据读写功能
Dao -- a beautiful new world?
[exercise] basic practice letter graph of Blue Bridge Cup
Inno setup the simplest user-defined interface effect
Learning automation ppt
Transfer the token on the matic-erc20 network to the matic polygon
DOM (document object model) document XML file object model
[ansible series] fundamentals 02 module debug
Solidy - fallback function - 2 trigger execution modes
SHELL
MySQL事物
电脑查看WiFi使用密码
Set of XXL job principles