The author is engaged in a year and a half of the foundation of the front end I will not tell, I tell some of the answers are not very good

tencent

One side

  1. webpackWhat are the disadvantages
  2. Why do you choose technology selectionvue.vueWhat are the drawbacks
  3. How it workscode reviewYes, there’s persistence integration
  4. jsThe basic type of (this brain short circuit, forgot)
  5. webpackTreatment for modularity
  6. How is the quality of component libraries guaranteed

One side

  1. Do you know webSocket? How does WebSocket do handshakes
  2. Production-consumer model
  3. Thread and process (Tencent asked me again in the second interview, I didn’t answer again, haha)
  4. How to batch grab articles
  5. How to deal with ios keyboard blocking the screen and ios cursor mispositioning when typing
  6. What are the advantages of the Virtual DOM
  7. Understanding of xpath?
  8. How does the client communicate with FE, and how does the client manipulate FE’s code
  9. Performance optimization from what aspects
  10. How does the front end achieve picture cropping

Second interview

  1. Do you know webAssembly? Let’s talk about it
  2. Algorithm problem: have an unordered array to find the median
  3. How many layers are there in a network protocol? Can you tell me more about their protocol
  4. Do you know about HTTP3? What are the optimizations for HTTP3
  5. Do you know about Vue3 and what optimizations are made relative to Vue2
  6. Talk about your understanding of PWA
  7. Vue renders components from parent to child and then to parent. What would you do if you were the framework designer
  8. Do you know about v8, how a piece of JS code executes

Tencent round tour, face doubt life, the second face asked a lot of computer basic things, because the author is not a computer major, so the answer is not very good

headlines

  1. How to import components in batches,require.context
  2. How do components communicate
  3. I asked the monitoring system how to calculate the white screen time and the first screen rendering time, how to report the data, and what is the process of reporting the data to the monitoring system
  4. Asked a$listenerand$attrBut I didn’tgetTo the interviewer’s point
  5. Talk aboutpwa
  6. vuex(What is a workflow?)
  7. knowfunction component?
  8. How do I select an image format, for examplepng.webp

Algorithm problem

If you have an array and a value, and you want to have a value greater than or equal to the minimum length of that value, for example [2, 3, 4, 7] and 5, then the minimum is 1 because 7 is greater than 5. If the number is 8, then the minimum is 2 because 4 + 7 is greater than 8

The number of numbers in an ordered array less than a certain number, for example

[1, 2, 3] 2 // 1Copy the code

Well quickly

  1. How do you cache requests, say there are 10 asynchronous requests, and if one asynchronous request returns a result, the rest of the requests will use that result, passing in the success and failure callbacks
  2. implementation(10).add(10).add(10)
  3. In this case, the code is as follows:
function Person() {}
const person = new Person();
Copy the code

4. Why do you need a root element 1 in the vue file

The word cut

  1. Use of vue hooks
  2. The principle of CDN
  3. Calculation of white screen time and first screen time
  4. How does the performance monitoring platform catch errors
  5. What are the compatibility problems encountered at ordinary times
  6. Leetcode peak problem
  7. Function of key in vue
  8. Code problem
  9. cdnThe principle,cdnHow to select the nearest cache server
  10. How do I preload audio and video resources
  11. Algorithm: do an array of compression
  12. http2How is multiplexing implemented
let arr = [1.2.3];
let fnArray = [];
for (var i = 0; i < arr.length; i++) {
    fnArray[i] = function () {
        return arr[i] * 2; }}let result = fnArray.find((fn) = > {
    return fn() === 4;
})
console.log(result);
Copy the code

Algorithm problem

To implement a stack with push and pop methods, and to get its minimum value, the complexity is O(1) :

[1.2.3.6.7] = >1- 3.67 -
[1.4.7] = >1.4.7
Copy the code

Meituan

  1. If you wrap a synchronous function as an asynchronous function
  2. What is the second request status code for the same picture
  3. Addition of large Numbers
  4. nativeHow does it communicate with the front end
  5. How to arouse theapp
  6. Write aurlAnalytic functions, includinghash
  7. Surveillance. Tell me what you knowperformanceRelevant information, fully interactive time
  8. To implement adeepCloneNeed to be compatible withset,map,symbol,object
  9. Let’s say it’s in the codea.addEventListener('click', fn1).a.addEventListener('click', fn2)At this timefn1andfn2Will it be enforced? If it’s added to stop bubbling
  10. How to click outside the element to close the element
  11. In a two-dimensional array ascending from left to right and top to bottom, find out if a number exists and output its position if it does
  12. offsetTopandscrollTopandscrollHeightWhat does that mean?
  13. vueIn thekeyWhat is the function of array and why is array not recommendedindex(high frequency)
  14. computedandwatchHave what distinction (this question appears frequency very high, suggest to understand carefully)
  15. http2andhttp1What are the advantages of (high frequency)
  16. keep-aliveRealize the principle of
  17. How do I know if it’s an array
  18. How do you design a component

Other companies

I didn’t invest in many companies either, so here are some of the interview questions from other companies

  1. What optimizations have you made to the component library
  2. How is style customization implemented for component libraries
  3. tcpSliding window of
  4. How does the front end do permission control
  5. HMRThe principle of
  6. If a white screen appears on the page, how can I rectify the fault

algorithm

rightView

There is a tree that looks at him from the right and outputs the result, for example

One, two, four, five, threeCopy the code

The above output tree is [1, 4, 3]

I concluded that the most frequent interviews are before and after the ranking points:

  1. Macro tasks and microtasks
  2. Browser cache
  3. bfc
  4. computedandwatchThe difference of

I think my face is the best Baidu, the results of baidu round swim, said I do not match (vuvuvuu ~~~)

As long as it is a phone interview, I must hang up, Baidu is a phone interview, Tencent hung up twice is a phone interview, autistic

experience

  1. Telephone interview must be hung up, can video face to video interview
  2. Dig a hole less to oneself, say out as far as possible oneself will understand
  3. A slightly more formal company is the algorithm must ask
  4. Larger companies will ask you about the back end as well as the front end
  5. General company you brush brush the face of the net can pass basically, slightly bigger company needs to combine the experience that uses at ordinary times
  6. You won’t and maybe the interviewer won’t, if not analyze first

The results of

In front of the year four small companies, all hanged, make of very self closed, feel oneself not quite and then after the year to reflect on pain, serious brush the interview questions on the Internet, find these interview questions you back, small company basic have no what problem. I voted for Ali, but Ali didn’t pay any attention to me. And then everything else is basically over. I will study hard in the New Year and then I will send all the things I prepared for the interview to Githubreview branch

Then the author finally chose Shenzhen headline