当前位置:网站首页>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
边栏推荐
- [Logitech] m720
- Interpretation of leveldb source code skiplist
- Flink学习7:应用程序结构
- PostgreSQL users cannot create table configurations by themselves
- RHCSA 03 - 文件的基础权限
- 普源DS1000Z系列数字示波器在通信原理实验中的应用方案
- The three-year revenue is 3.531 billion, and this Jiangxi old watch is going to IPO
- The interactive solution of JS and app in the H5 page embedded in app (parameters can be transferred and callbacks can be made)
- TCP-三次握手和四次挥手简单理解
- 指针数组和数组指针
猜你喜欢
The three-year revenue is 3.531 billion, and this Jiangxi old watch is going to IPO
Restore the subtlety of window position
Unity 绘制弹球和台球的运动轨迹
The difference between bagging and boosting in machine learning
RHCSA 04 - 进程管理
leetcode刷题:二叉树05(翻转二叉树)
Redis:集合Set类型数据的操作命令
dried food! Generation of rare samples based on GaN
Idea configuration 360zip open by default -- external tools
Parameterization of controls in katalon
随机推荐
Three years of graduation, half a year of distance | community essay solicitation
Katalon uses script to query list size
RHCSA 01 - 创建分区与文件系统
How to add custom API objects in kubernetes (1)
ctf-pikachu-XSS
The maximum expiration time of client secret in azure ad application registration is modified to 2 years
(指针)自己写一个比较字符串大小的函数,功能与strcmp类似。
2020 Bioinformatics | TransformerCPI
线程常用的方法
Activiti7 task service - process variables (setvariable and setvariablelocal)
架构实战营 - 第 6 期 模块九之毕业设计
How was my life in 2021
【微服务|openfeign】使用openfeign远程调用文件上传接口
一位毕业生的自我分享
[webrtc] M98 Ninja build and compile instructions
Unity资源路径
The three-year revenue is 3.531 billion, and this Jiangxi old watch is going to IPO
Redis:有序集合zset类型数据操作命令
Keysight N9320B射频频谱分析仪解决轮胎压力监测方案
Storage of MySQL database