A directory
What’s the difference between a free front end and a salted fish
directory |
---|
A directory |
Two jsliang finishing |
Iii References |
3.1 Handwritten series of articles |
3.2 write a call/bind/apply |
3.3 Handwritten Deep copy and Shallow copy |
3.4 write a Promise |
Two jsliang finishing
This series consists of 7 articles, 19 handwriting methods and 32 knowledge points.
Handwriting series storage location:
- Write a series of
Specific implementation of each handwriting:
- Promise
- The short version
Promise
(Asynchronous is not supported) - handwritten
Promise
(resolve
,reject
,then
) - implementation
Promise.all()
- implementation
Promise.race()
- implementation
Promise
Asynchronous scheduler
- The short version
- Anti-shake and throttling
- Image stabilization
- The throttle
- Anti-shake + throttling (anti-shake that must be triggered)
- Shallow copy and deep copy
- Handwritten shallow copy
-
Object.assign
- Shallow copy other methods:
concat()
,slice()
,[...arr]
- Handwritten deep copy
-
JSON.parse(JSON.stringify())
- The Lodash
_.cloneDeep()
- JQuery
$.extend()
- call+bind+apply
- native
call
And handwrittencall
- native
bind
And handwrittenbind
- native
apply
And handwrittenapply
- native
- JSONP
- The basic principle of:
script
Of the labelsrc
There are no cross-domain constraints to complete the implementation - The advantages and disadvantagesOnly:
GET
; Good compatibility - Simple implementationThrough:
url, params, callbackKey, callback
To define theJSONP()
Method parameters - Consider multiple calls: Based on simple implementation, add array save
callback
The return of
- The basic principle of:
- new
- Three lines of code handwritten
new
- handwritten
new
Five characteristics of the - Full version handwriting
new
- Three lines of code handwritten
- other
-
Object.create()
- ES5 implements class inheritance
-
instanceof
- Currie,: o
add(1)(2)(3)
- The iterator
- Ajax
- Array flattening: hand,
flat()
,reduce()
- Array to heavy: hand,
Set
,filter()
- other
-
Iii References
There are 46 references in this series.
3.1 Handwritten series of articles
- Front-end interview common handwriting function[Recommended Reading: 30min]
- 32 handwritten JS to strengthen your JS foundation[Recommended Reading: 30min]
- 22 high-frequency JavaScript handwritten interview questions and answers[Recommended Reading: 30min]
- “Intermediate and advanced front-end interview” JavaScript handwritten code unbeatable secrets[Recommended Reading: 30min]
- Several JS code handwritten problems and some code implementation[Recommended Reading: 30min]
- Ternary – handwritten code series[Recommended Reading: 30min]
- CORS principle and implementation[Recommended Reading: 30min]
- JSONP principle and implementation[Recommended Reading: 30min]
- Jsonp principle and implementation【 Reading Suggestions: 10min】
- 20 JS principle questions help you interview a helping hand![Recommended Reading: 30min]
- 7 minutes to understand the throttling, anti-shaking and application scenarios of JS【 Reading Suggestions: 10min】
- Analysis of anti – shake and throttling principle【 Reading Suggestions: 10min】
- Front-end performance related: anti – shake, throttling【 Reading Suggestions: 5min】
- Interviewer (6): Did you write “Common front-end components”?【 Reading Suggestions: 20min】
- Interviewer: React/Vue can communicate with components using Event Bus. Can you implement this?【 Reading Suggestions: 20min】
- Brief introduction to the realization principle of Instanceof and Typeof【 Reading Suggestions: 10min】
- Unlock multiple JavaScript arrays to go heavy poses【 Reading Suggestions: 20min】
- How to use arrays better in JavaScript【 Reading Suggestions: 10min】
- There are seven ways to implement array de-duplication【 Reading Suggestions: 20min】
3.2 write a call/bind/apply
- MDN – Arguments【 Reading Suggestions: 5min】
- MDN – call【 Reading Suggestions: 5min】
- MDN – apply【 Reading Suggestions: 5min】
- MDN – bind【 Reading Suggestions: 5min】
- The CALL and apply methods are not used to emulate the BIND method of ES5[Reading Suggestions: 1H]
- JavaScript deep simulation of call and apply【 Reading Suggestions: 20min】
- This, apply, call, bind[Recommended Reading: 30min]
- Interviewer: Can you simulate implementing JS call and apply methods【 Reading Suggestions: 10min】
- Call apply bind【 Reading Suggestions: 20min】
- Call apply and bind【 Reading Suggestions: 10min】
3.3 Handwritten Deep copy and Shallow copy
- How to write a deep copy that will impress your interviewer?[Reading Suggestions: 2H]
- The ultimate quest for deep copy (90% of people don’t know)[Reading Suggestions: 1H]
- JavaScript basics – deep and shallow copy[Recommended Reading: 30min]
- Deep and shallow copy of JavaScript topics【 Reading Suggestions: 20min】
- Implementation of shallow copy and deep copy in javaScript【 Reading Suggestions: 20min】
- Deep dive into JavaScript deep copy【 Reading Suggestions: 20min】
- “JavaScript” walks you through deep copy, shallow copy, and circular references【 Reading Suggestions: 20min】
- How to implement a deep copy of the interview question[Recommended Reading: 30min]
- Interviewer: Please implement a deep clone【 Reading Suggestions: 10min】
3.4 write a Promise
- Promises/A+ 100 lines of code[Recommended Reading: 30min]
- Implement Promises with minimal support for asynchronous chained calls (20 lines)【 Recommended reading: 20min】
- Classic INTERVIEW Questions: The most detailed handwritten Promise tutorial ever[Recommended Reading: 30min]
- 1. Write A Promise that Promises/A+ Promises from scratch[Reading advice: Probably read it all over, no clear analysis of the previous]
- Promise implementation principle (source code attached)[Reading advice: Probably read it all over, no clear analysis of the previous]
- Analyze the internal structure of Promise, step by step to achieve a complete Promise class that can pass all Test cases[Recommended reading: write in detail, not clear analysis of the previous]
- Xiao Shao teach you to play promise source code[Recommended reading: write in detail, not clear analysis of the previous]
- Promise won’t…? Look here!! The most accessible Promise ever!![Recommended reading: write in detail, not clear analysis of the previous]
Jsliang’s document library is licensed by Junrong Liang under the Creative Commons Attribution – Non-commercial – Share alike 4.0 International License. Based on the github.com/LiangJunron… On the creation of works. Outside of this license agreement authorized access can be from creativecommons.org/licenses/by… Obtained.