当前位置:网站首页>The difference between apply, call and bind
The difference between apply, call and bind
2022-07-25 03:57:00 【Big chicken legs are best】
Their role is to this Bind to the specified object .( change this The direction of )
- apply Take two parameters , The first parameter specifies the body of the function this The direction of the object , The second parameter is a subscript set , This set can be an array , It can also be an array of classes ,apply Method passes the elements in this collection as parameters to the called function .
- call The number of parameters passed in is not fixed , Follow apply The same thing , The first parameter also represents the inside of the function this Point to , When the first parameter is null、undefined when , The default point to window; Starting with the second parameter , Each parameter is passed into the function in turn .
- bind Function allows you to pass in the required this Bound object , And optionally pass in all or part of the formal parameters , Then return a new function ( Original function changed this Function pointed to )
边栏推荐
- Zhanrui Mobile Phone Unlocked
- 基于SSM实现后勤报修系统
- NC | progress has been made in the study of the ecological network relationship between dissolved organic carbon and microorganisms in the context of global change
- Task02 | EDA initial experience
- CVPR 2020 | social stgcnn: pedestrian trajectory prediction based on graph convolution
- 01_ Education 4
- Machine learning notes - building a recommendation system (4) matrix decomposition for collaborative filtering
- Bond network card mode setting
- Database transactions (often asked)
- Interview question 05.06. integer conversion
猜你喜欢

Deep learning method of building a model from zero

NC | progress has been made in the study of the ecological network relationship between dissolved organic carbon and microorganisms in the context of global change

Yuntu says digital asset chain: your God of digital asset property protection

DNS resolution experiment
![[template engine] microservice Learning Notes 6: freemaker](/img/6a/cfe9c5aea0f7fc83d0812237de2256.png)
[template engine] microservice Learning Notes 6: freemaker

Servlet个人实操笔记(一)

Force the resumption of game 302 of the week

144. Preorder traversal of binary tree

原创 | ueditor1.4.3-asmx绕过waf
![[leetcode medium] 34. Find the first and last positions of elements in the sorted array - array double pointer](/img/f0/e572fe077ddd51b9c160e3382b2a07.png)
[leetcode medium] 34. Find the first and last positions of elements in the sorted array - array double pointer
随机推荐
基于SSM实现后勤报修系统
Operations in shell
Unity: text input box for numerical judgment
Electronic bidding procurement mall system: optimize traditional procurement business and speed up enterprise digital upgrading
Advanced numbers | [calculus of multivariate function] chain derivation method, implicit function derivation method, total differential form invariance, multivariate function extremum
Execution flow control of shell
Modbus poll/slave simulator tutorial
.net6 miniapi (V): Options
Secondary vocational network security skills competition P100 web penetration test
Which stock exchange has the lowest commission? Is online account manager safe to open an account
Force deduction problem 238. product of arrays other than itself
Day 9 (capture traffic and routing strategy)
Table of contents of force deduction questions
[Flink] protocol operator reduce
A 20 yuan facial cleanser sold tens of thousands in seven days. How did they do it?
01_ Education 2
Servlet personal practice notes (I)
10. 509 Certificate (structure + principle)
[Flink] transform operator map
Use "display: flex; justify content: Center; align items: Center;" Solve the problem that the streaming grid layout cannot be centered