当前位置:网站首页>Operation of ES6
Operation of ES6
2022-07-04 04:22:00 【Careteen】
Catalog
- var function
- var The problem is
- Variable promotion ( First of all , Will not copy )
- There is no block-level scope , Is global scope / Function scope
- var The problem is
- let const
- let The advantages of
- No variable promotion , Cannot be defined repeatedly , Does not pollute global variables
- Hui He {} Generate scope
- let There are certain problems
- let The advantages of
let a = 2 { console.log(a) let a =1 } // undefined
- const
- let You can reassign const Cannot change the assigned space
const a = 1 a = 2 // Report errors const b = [] b.push(1) // The normal operation
- Extension operator
- Sum any number
- ES5 Realization slice
- ES6... Realization
- Merge two arrays
- ES5 Realization concat
- ES6... Realization
- Merge two objects
- The problem is ( Deep copy 、 Shallow copy )
- Deep copy The copy is not a reference address
- ... Only one layer can be expanded, which is a shallow copy , It needs recursive processing
- JSON.parse It can be solved simply
- JSON There are certain problems
- Can handle null/date
- Cannot handle regular 、 function
- Based on the above considerations, realize a deep copy ...
- Sum any number
- Deconstruct assignment
- Object to deconstruct
- An array of deconstruction
- Arrow function arrowFn
- No, this
- No, argument
- Object.defineProperty
- Use
- application
- vue2.0 Implement data bidirectional binding
- shortcoming
- Cannot detect array
- proxy、reflect
- application
- vue3.0 Rewrite data bidirectional binding
- shortcoming
- Poor compatibility
- advantage
- Can detect array
- Deep monitoring ( It can be recursive )( Think for yourself )
- application
- class class
- ES5 knowledge
- proto Looking for the prototype of the class , All types
- prototype This is the prototype , Only constructors have prototypes
- Inherit
- Inherit properties on instances
- call
- Inherit public attributes
- Object.create
- Child.prototype = Object.create(Parent.prototype, { constructor: { value: Child } })
- ES5 How to achieve
- All of them
- call + Prototype inheritance
- Inherit properties on instances
- ES6 Class
- Translate it into ES5 The appearance of
- ES5 knowledge
- Decorator
- Decoration
- Attributes in the decoration class
- Methods in decorating classes
- Cannot decorate functions , Because the function has variable promotion
- Set/Map
- API List
- Interview questions
- The union of two arrays
- Find the intersection of two arrays
- Difference set of two arrays
- Array method
- findIndex
- reduce
- application
- Array sum
- Combine compose
- application
边栏推荐
- Redis:集合Set类型数据的操作命令
- 网络 - VXLAN
- 还原窗口位置的微妙之处
- Cesiumjs 2022^ source code interpretation [0] - article directory and source code engineering structure
- The difference between bagging and boosting in machine learning
- 架构实战营 - 第 6 期 模块九之毕业设计
- leetcode刷题:二叉树04(二叉树的层序遍历)
- Keysight N9320B射频频谱分析仪解决轮胎压力监测方案
- ctf-pikachu-XSS
- Redis cluster view the slots of each node
猜你喜欢
My opinion on how to effectively telecommute | community essay solicitation
R语言中如何查看已安装的R包
资深开发人员告诉你,怎样编写出优秀的代码?
02 specific implementation of LS command
[Logitech] m720
DP83848+网线热拔插
三年进账35.31亿,这个江西老表要IPO了
Leetcode skimming: binary tree 09 (minimum depth of binary tree)
I was tortured by my colleague's null pointer for a long time, and finally learned how to deal with null pointer
Activiti7 task service - process variables (setvariable and setvariablelocal)
随机推荐
[Huawei cloud IOT] reading notes, "Internet of things: core technology and security of the Internet of things", Chapter 3 (I)
Graduation project: design seckill e-commerce system
Brief explanation of depth first search (with basic questions)
2021 RSC | Drug–target affinity prediction using graph neural network and contact maps
PostgreSQL users cannot create table configurations by themselves
leetcode刷题:二叉树06(对称二叉树)
Katalon uses script to query list size
一位毕业生的自我分享
PPt 教程,如何在 PowerPoint 中将演示文稿另存为 PDF 文件?
Parameterization of controls in katalon
SDP中的SPA
Exercises in quantum mechanics
My opinion on how to effectively telecommute | community essay solicitation
C语言双向链表初版
【微服务|openfeign】使用openfeign远程调用文件上传接口
Interpretation of leveldb source code skiplist
User defined path and file name of Baidu editor in laravel admin
Msgraphmailbag - search only driveitems of file types
10 reasons for not choosing to use free virtual hosts
The interactive solution of JS and app in the H5 page embedded in app (parameters can be transferred and callbacks can be made)