Interview encounter various problems (in this thanks to my little friend offered me a steady stream of interview questions), I have only to questions and answers related links (ready-made interpretations of others have written very good, I will not go myself to write), you can click the appropriate link to go to see the answer. in addition, some of the problems I have expanded a bit, so there will be two or three links, please do not be surprised. Let's start into the topic:
1.typeof and instance of what is the difference?
instanceof operator to test whether there is an object constructor prototype property in its prototype chain. Syntax described object constructor instanceof instanceof operator to detect the presence or absence in the prototype constructor.prototype chain of object parameters.
https://baijiahao.baidu.com/s?id=1571326373449053&wfr=spider&for=pc
2.JavaScript basic data types are there? You know what reference data types?
Undefined
、Null
、Boolean
、Number
、String
、Symbol
Object
类型
、Array
类型
、Date
类型
、RegExp
类型
、Function
类型
https://blog.csdn.net/weixin_41646716/article/details/81700761
3.
Mechanisms events you know?
Event capture stage, in the target phase, the event bubbling phase.
https://www.cnblogs.com/renlong0602/p/4401113.html
4. What is the principle mechanism of events is?
https://www.cnblogs.com/yexiaochai/p/3477715.html
The prototype you used it? What you do with it?
https://blog.csdn.net/ProswpuAlan/article/details/79337983
6. Copy the deep and shallow copy What is the difference?
Shallow vs. deep copy for general reference type value (e.g., objects) in terms of the primitive values (e.g. undefined, null, number, string, boolean and new es6 the Symbol ), as long as the copy, it must be another to open up storage space! Base types are stored on the stack, the stack reference types exist
https://www.cnblogs.com/Chen-XiaoJun/p/6217373.html
https://blog.csdn.net/qq_40421277/article/details/79999044
7. For arrays and objects, you realize how deep and shallow copy copy?
Target only a simple layer, then use es6 of Object
.assign ()
Otherwise use a recursive function can only be a deep copy. Like the first link 6, you can see
8. What causes these differences are deep and shallow copy copy that?
Memory storage is not the same place, in a heap in a stack.
Shallow copy: that is, when the object is copied, only the data members of the object in a simple assignment, if there is a dynamic member object, that pointer, shallow copy will be a problem.
Deep copy: For deep copy, the presence of a pointer for the member variable, not just a simple pointer assignment, but to re- allocate memory space.
9. == === and you know what? What are the different among its?
==
: It was only compare values ===
: not only worthy comparison, the type of comparative data should be
10. What is the connection between the constructor and prototype them?
https://www.jianshu.com/p/d138abd98633
11. Closure used? What scene use closures have?
https://www.cnblogs.com/star-studio/archive/2011/06/22/2086493.html
12. Talk about your understanding of this
- this always point to the object where the function is running, rather than a function created when the object is located.
- Anonymous functions and not in function any object, this point window.
- call, apply, with mean this is who is who.
- Ordinary function calls, function calls whom, this points to anyone.
https://blog.csdn.net/lxcao/article/details/52750575
13. How can I tell what this points to the current?
https://blog.csdn.net/suxianbaozi/article/details/50512542
14.bind (), apply (), call (), these functions are usually used? They talk about what's the use? How do you use the?
https://blog.csdn.net/chenleixing/article/details/44259161
15. Define a global function, function inside this what point? What would print this output?
https://blog.csdn.net/qq_39207948/article/details/81056887
16. The arrow function used? Arrow function and normal function What is the difference?
- this function is always an arrow pointing to the context of this, any method can not change its point, such as call (), bind (), apply ()
- this point to call it a normal function of that object
- Arrow function as an anonymous function, not as a constructor, you can not use new
- Arrow function does not bind arguments
- Arrow function will capture their value in this context, as its value this
https://www.jianshu.com/p/73cbeb6782a0
17. You are the project through which to optimize the development process of the project?
https://www.cnblogs.com/liulilin/p/7245125.html
18.argument you know? There are arrows function argument object?
https://segmentfault.com/q/1010000008720963?_ea=1724154
19.argument and ordinary array What is the difference?
arguments is an array object class. On behalf of the list of parameters passed to a function
https://blog.csdn.net/xiaotao_css/article/details/72794650
20. The VUE two-way data binding is how to achieve?
https://www.cnblogs.com/kidney/p/6052935.html?utm_source=gold_browser_extension
Underlying 21.vue with object.definedPropety () to implement it have any drawbacks or limitations?
At the same time you can not be set accessor (get and set) and wriable or value, otherwise they will be wrong.
https://blog.csdn.net/qq_30574731/article/details/82693909
22. The Vue's new version ready to come out, you know?
https://blog.csdn.net/itKingOne/article/details/84175760
What changes have 23.Vue3.0 compared to the current version? These changes its virtues?
https://blog.csdn.net/itKingOne/article/details/84175760
proxy expansion:
https://www.jianshu.com/p/81eb68ae5eb1
24.promise used to do? What are its limitations?
https://www.jianshu.com/p/2bfb741b1f01
https://www.cnblogs.com/Kellana/p/7602210.html
25. var and let what's the difference, you have to find out about variable lift?
Var in the stack, const, and let the heap (except to add that the link outside)
https://www.cnblogs.com/fly_dragon/p/8669057.html
https://www.cnblogs.com/heioray/p/9487093.html
26. Closures and scoping What do you know?
Closure has two functions:
the first is to read the variables outside of the function itself (along scope chain to find)
The second is to allow these external variables are always stored in memory
https://blog.csdn.net/whd526/article/details/70990994
27. The ES6 used it? What's new used?
https://www.jianshu.com/p/ebfeb687eb70
https://segmentfault.com/a/1190000004365693
https://segmentfault.com/a/1190000004368132
28. Talk about your understanding of the promise of
https://www.jianshu.com/p/063f7e490e9a
https://www.jianshu.com/p/fe5f173276bd
There is a sort of 29.es6 you know?
https://blog.csdn.net/huoji555/article/details/78759718
30.sort () method used?
http://www.w3school.com.cn/js/jsref_sort.asp
31. How do you implement an array of deduplication?
It is currently used to re-program the new set of data characteristics ES6 deconstructed, and then converting the resulting set into an array of objects.
was arr = [1, 4, 7, 4, 3, 2, 1, 4, 7];
var newArr = Array.from(new Set(arr));
console.log(newArr);
https://blog.csdn.net/huoji555/article/details/78759718
32. The Array.from ES6 What is the role?
https://www.cnblogs.com/jf-67/p/8440758.html
33.vue-router hook function
https://blog.csdn.net/qxb5215/article/details/80346820
34. The Cookie and Session What is the difference ?
Session directly translated into Chinese is more difficult. Generally translated into the time domain. In computer science terminology. Session refers to a time interval the end user communication with the interactive system. Usually refers to the registration into the system to log out of time elapsed between systems. And the need to assume, then, there may be some room for maneuver.
To note that the concept of a Session must include a specific client, and the server-side specific uninterrupted operation time.
- cookie data is stored on the customer's browser, session data on the server
2, cookie is not very safe, people can analyze COOKIE stored locally and steal information
3, session will be saved on the server for a certain time. When accessing the increase would be more occupy your server performance
4, a single cookie in the client's limit is 3K, a site that is stored in the COOKIE client can not be greater than 3K. - Let's say Cookie is a mechanism to determine the identity of the customer by checking the customer who "pass", then Session mechanism is used to confirm the identity of customers through "customer list" to check on the server. Session equivalent program built on a customer file server, customers only need to query when visiting customer file table on it.
https://www.cnblogs.com/wzzkaifa/p/7364595.html
35.URL redirect?
https://blog.csdn.net/fly_hps/article/details/85134168
Under url redirection vulnerabilities in most cases it is caused by lax development restrictions, by malicious users to have a chance. So developers in the development process, it must strictly be judged on the user's input filter, if possible, can be generated in the background, limiting user input, otherwise it will cause users to hijack other serious consequences XSS, fishing. Of course, there are a lot of unexpected vulnerability posture, waiting for us to explore.
36. The difference between the http and https?
ca https protocol needs to apply for a certificate, the certificate is generally free little need to pay.
http hypertext transfer protocol, information is transmitted in the clear, https is encrypted with a security ssl transfer protocol.
http and https using a port different connections are not the same with the former 80, which is 443.
Http connection is very simple, is stateless. HTTPS protocol is constructed from SSL + HTTP protocol can be encrypted transmission, network authentication protocol than http protocol security.
https://www.cnblogs.com/qiangxia/p/5261813.html
37. The front end face questions dry (recommended)
https://segmentfault.com/a/1190000015162142
38.dom high operating costs in what?
https://segmentfault.com/a/1190000014070240
39. The event loop mechanism is kind of how?
https://zhuanlan.zhihu.com/p/26229293
https://zhuanlan.zhihu.com/p/26238030
40. The event loop mechanism derived from a face questions (see recommended!)
https://juejin.im/post/58cf180b0ce4630057d6727c
41. On several common web attacks as well as solutions (this is recommended to buy white hat talking about web security, guaranteed to learn something!)
https://blog.csdn.net/zou2ouzou/article/details/60888073
42. simple request and complex requests
http://www.ruanyifeng.com/blog/2016/04/cors.html
43.axios request interface to initiate two requests (OPTIONS and POST / GET)
https://blog.csdn.net/qq_27626333/article/details/77005911
44. The two requests to solve the problem of
https://www.jb51.net/article/149537.htm
Lifecycle 45.vue his son inherited component assemblies &
https://www.jianshu.com/p/dae2bf62d725
46. The Web front-end performance optimization 9 big problem
https://www.cnblogs.com/liulilin/p/7245125.html
Being so much for the update! If you have good knowledge sharing can find me, I added together to come Oh! My goal is to progress together!