“Time does not stop, creation, this article is participating2021 Year-end Summary Essay Contest”
Gaode Didi Meituan netease Kuaishou Tencent Jinshan 360 Baidu Zhihu and other large factory interview experience
A year and a half ago, I wrote aSwastika front end face, finally went to equip the bytes, because of the reason of some business adjustment, I run again, didn’t write a second interview are hung behind or I don’t want to face again, the attached department is hanged or face again after I turned down the other departments, according to a start time sorting, there are a lot of excellent company my face but forget recording, Momenta, Perfect World, Palm Reading, etc. It has been updated to 13,000 words,
Each family’s self-introduction and the reason for leaving part I omit ~
Writing in the front
- The interview lasted for a whole four weeks with a very high density, averaging four homes a day. I was physically and mentally exhausted. It is not recommended to arrange such intensive interviews unless time is tight
- Although the eight-part essay is a lot of useless, but the back also have to back
- Algorithms and data structures is not a short period of time to practice, but the front there won’t be too hard to the algorithm of the topic, is the basic dynamic programming, backtracking, array traversal, linked list, binary tree, if their algorithm is less, looking for a job a month or two in advance the power button on the more classic topic brush a brush, met at the very least not did not train of thought, All kinds of sorting principle or to see, it is easy to be asked, and once the answer can not come up very minus points
- Whether you write Vue or React (if you write NG instead of me), it’s easy to be asked the difference between the two. It’s recommended to talk from multiple perspectives, such as framework features, ecology, development experience, community review, performance, source code, etc
- Have window project had better prepare a few more, had better be different types, such as business, partial of the backend, component library, engineering and emerging technologies, according to the content you’re good at least for two or three, some interviewers want to see what have you done have difficulty, a recruit fresh at that time is not working
- The different role of the interviewer asks questions, to answer in different angles, such as ask you have same processed compatibility issues, on the front of the interviewer, you can answer met incompatible scene and solve the details, meet the leader of the interview can be more from the perspective of how to efficient validation for compatibility problems this answer, pay attention to the scene
- Finally the amount of time the interviewer will ask questions, personally, I usually ask business content, technology stack, team size or future business and technical development direction, to the back of the interviewer I would ask the interviewer in the role of the team, according to his role combining his expression of the above questions can determine the preliminary team is on the edge of the, or core, Or is he just a pie painter
- Overall, the best interview experience is Microsoft, humble, polite, I feel that Microsoft interviewers have a complete set of interview skills, such as
- “Next, I will ask you some business-related questions. Please answer them without violating the company’s current principles. If you can’t answer my questions, you can tell me directly.”
- “You can do this with any compiler you’re familiar with.”
- “Please feel free to interrupt me if you have any questions about what I’m going to describe.”
- For the questions I answer and the projects I describe, the interviewer will usually give a positive response and move on to further questions if there are any
- In one round, I misunderstood the interviewer’s question and implemented something else. The interviewer’s first reaction was that he didn’t make it clear and said that the code I understood in this direction was implemented well
- Later in the English interview, my English was poor, and the interviewer said a long paragraph of English, which I almost did not understand. The interviewer asked me whether I spoke too fast
Taptap
One side
- What treatment has been done to the skin, have you dealt with the skin that may change the size
- What practices i18N does within the team
- What problems webpack encountered in migrating Vite
- What practices CI/CD does
- How does JWT implement kicking and the difference between session and JWT authentication
- TCP three-way handshake http1.0, 1.1, 2 are different
- HTTPS. Why is HTTPS protected against man-in-the-middle attacks
- Bubble sort
Second interview
- I’m going to give you an array that’s already in ascending order. I’m going to give you a number, and I’m going to find out how many times that number appears in the array
- Shuffling algorithm, how do you verify that this shuffling algorithm can shuffle enough cards
- Node Stream is trying to fetch a large amount of logs. Due to memory limitation, it can only fetch part of the logs at a time. Now it wants to fetch 10,000 logs randomly from all logs
- Describe what the project did as a result of your initiative
jingdong
One side
- Let’s introduce promise and why it’s called promise
- How esModule differs from CommonJS and what are its main advantages
- How does Vite compile your code? How does vite handle commonJS packages
- Do you know how to convert to the combined API of ESM VuE3? What are its advantages
- This section describes HTTPS CORS
- Do you know about the micro front end
- Why do you use VUE on mobile h5 and React on PC management?
- Do you know how to manipulate git objects? Git reset/rebase
- You have danced frequently before, and each section has not been more than two years. Jingdong has a two-five principle. What do you think of this problem
Second interview
- Your small program is to use taro, do you know the principle of taro
- What is the architecture of your CMS system
- Did you know that WebPack now supports ESM?
- Is your component library company-wide or in-house, developed from scratch or based on other open source component libraries?
- Is vue3 useful? Why didn’t the team use vuE3?
- What syntax do you use for React? Do you know the principle of Fiber?
- How many people are on your current team and what do you want to do in the future?
The degree of grain full
- How to understand vUE one-way data flow
- What are the communication methods between Vue components? Have you used EventBus? What is the idea of EventBus
- Let me write a custom V-Modal
- $attrs $listener
- What is the Vue life cycle and what is it for? What updated conditions will trigger the Vue instance when beforeCreate is updated? What API will be called when the component is destroyed
- When will component destruction be triggered, and will custom and native events be unloaded during destruction
- Have you ever written a custom directive? What hooks does a custom directive have
- What is the difference between traditional front-end development and framework development
- There are two defects in Vue2’s data response formula. Do you know which two defects they are, why they exist and how to solve them
- How does Vue implement array listening, why Vue does not hijack array subscript modification
- Symbol, iterators, which are iterable
- Get the intersection of two arrays using Set
- Realize the Promise. All
- What’s the difference between animation and Transition
- Write an animation, a box, that starts with a zoom of 0, 50%, 1,100 percent, 0, starts and ends slowly, lasts for 2 seconds, delays for 2 seconds, and then stays at the end
This is one of my more outrageous, ask a variety of API, no actual nutrition, to be honest, pretty boring, the interview experience is also mediocre
BOSS hired straight
- Talk about the most complicated project
- What have you done in accessibility projects
- Do the night mode has not considered the user set a timer to switch the mobile phone night mode
- What are the kernels of Android and Apple webView that your H5 project relies on respectively
- What optimizations have been made on Lottie animations, and have you considered using CSS animations on low-end machines
- If you make an animation of the earth itself spinning, and there’s an airplane going around it, and the airplane’s propeller is going around itself, what are the points that need to be considered
- I did on CI/CD
- What problems have webpack encountered in migrating Vite? Why was Webpack slow before? Was there any optimization
- What the common tools within the business refine
- Do these projects that oneself play introduce once, basically be doing what
- What are you looking for this time
Qihoo 360 (Security Guard)
- Do you write more Vue or React?
- Career planning
- CSS implements a sector
- Ask the output, and why (I don’t remember the specific code, but this examination point, the following questions are also)
var a = { name: "Sam" };
var b = { name: "Tom" };
var o = {};
o[a] = 1;
o[b] = 2;
console.log(o[a]);
Copy the code
- Ask the output
async function async1() {
console.log("async1 start");
await async2();
console.log("async1 end");
}
async function async2() {
console.log("async2");
}
console.log("script start");
setTimeout(() = > {
console.log("setTimeout");
}, 0);
async1();
new Promise((resolve) = > {
console.log("promise1");
resolve();
}).then(() = > {
console.log("promise2");
});
console.log("script end");
Copy the code
- Ask the output
const promise1 = Promise.resolve("First");
const promise2 = Promise.resolve("Second");
const promise3 = Promise.reject("Third");
const promise4 = Promise.resolve("Fourth");
const runPromises = async() = > {const res1 = await Promise.all([promise1, promise2]);
const res2 = await Promise.all([promise3, promise4]);
return [res1, res2];
};
runPromises()
.then((res) = > console.log(res))
.catch((err) = > console.log(err));
Copy the code
- What does Vue’s nextTick do? React composite events and native events
- What is the difference between Webpack and Vite, and what is the motivation for cutting Vite
- What was the previous development model, was one person responsible for a module or was it allocated according to requirements
- Know about the micro front end
HR invited me for a second interview on site. I said THAT I could not go to Beijing. HR said that they would help me coordinate the remote interview, but they never contacted me again
Momo
- What tools have you made before
- What are the mobile compatibility problems encountered
- How do I limit the number of concurrent Promise requests
- Implement this pipe
const fn = pipe(addOne, addTwo, addThree, addFour); // The four functions passed into pipe are already implemented
fn(1); // 1 + 1 + 2 + 3 + 4 = 11
Copy the code
- Did you know about Vue3, why you haven’t used Vue3 yet, did you know about Proxy, what’s the difference between it and defineProperty, what’s the difference in performance
- What should Vue do if it wants to reuse templates
- Did you make a skeleton screen? How did you do it
- Have you ever done lazy loading
- Do you have React Native experience
- MySQL optimization
Scott
One side
- What do you do if you implement a three-column layout that requires three columns of the same width to wrap multiple elements
- Rem or VW for mobile adaptation? What is the principle of separation? What plan do you use?
- What ES6 syntax is used and what features are commonly used
- Promise to talk in detail about what problems we can solve
- What will happen if P succeeds? If P fails and enters B, will the following C or D continue if B fails again
p.then(a, b).then(c).catch(d);
Copy the code
- What are the four attributes of this class? What is the difference between fn and f
class A {
static a = 1;
b = 2;
fn() {}
f = () = > {};
}
Copy the code
- Implement a node asynchronous function promisify
- What is the Vue life cycle
- What is the principle of keep-alive and how can you achieve similar effects without using it
- Difference between V-if and V-show
Second interview
- Tell me about your previous projects
- If you need to implement a full-text translation function, how do you deal with the tag part of rich text, and how do you backfill the data after translation
- Typescript implements a string type with left Spaces removed
type A = " Hello world! ";
type B = LeftTrim<A>; // 'Hello world! '
Copy the code
- If you need to implement a bullet-screen component, how do you design the props and state of the component, how do you implement it internally, and what can be optimized
On three sides
- Introduce a challenging project
- What improvements have you made to accessibility
- What have you done with i18N
- What kind of product do you make
const data1 = {"a.b.c": 1."a.b.d": 2}
const data2 = {"a.b.e": 3."a.b.f": 4}
// Merge the above two objects into a JSON, where. Needs to be processed into the corresponding hierarchy
Copy the code
- What is your understanding of Serverless
- What is the future direction of development
- What are your technical expectations
drops
One side
- Previously done SSR is what kind of server rendering, isomorphism
- Describe your responsibilities in your last job
- This paper introduces the single example model and its application in front end
- Introduce the prototype chain
- Introduce front-end inheritance
- HTTP, TCP, seven layer network architecture
- What is the maximum number of resources that chrome can load at one time, and what should I do if I want to load more resources at the same time
- How does http2 multiplexing work
- Implement a call method that changes the reference to this
- Find the NTH term of the Fibonacci sequence
- Have you heard about the cross end? Taro, Uniapp
- Do you have Devops experience
- Do Docker and K8S have relevant experience
- What do you know about JSON Web tokens and how they differ from other authentication methods
- Do you know network security, how CSRF defense, SameSite has several values
Second interview
- How have you grown at each stage of your previous job
- Some of the projects you’ve worked on that have been really exciting
- What would you like to do if you were in your previous department
- What are your views on TDD
- How does one set of mobile code adapt to multiple terminals
On the second day, we talked about the project in front of each other. Finally, we kept telling me the future development trend of the department for a long time. To tell the truth, I was a little sleepy and didn’t know why I hung up
The little red book
- Introduce a difficult project
- If the user wants to define a color to generate the corresponding skin, how to make the scheme
- What problems did Webpack have migrating Vite
- Vue vs. React
- The Diff algorithm for Vue and React differs
- Write a method to determine whether a string is valid XML
const str1 = "<html><div>123</div></html>"; // true
const str2 = "<div><div>123</div><div></div></div>"; // true
const str2 = "<html><div>123</html></div>"; // false
Copy the code
- To find a string in a matrix, you can move it up, down, left, and right, but cannot go back. Return true if the string is found
const str = "abcde";
const matrix = [
["0"."0"."0"."0"."0"."0"],
["0"."0"."a"."b"."0"."0"],
["0"."0"."0"."c"."d"."0"],
["0"."0"."0"."0"."e"."0"]];Copy the code
- A frog can jump 1, 2 or 3 steps at a time, but there are several ways to jump up to N steps
The front blowing force time is a little long, resulting in the back of the algorithm to do the problem time is not enough, hung up
Meituan (Wine Tour)
One side
- Difficult projects you’ve done in the past
- Browser caching mechanism
- HTTPS
- What is the principle of throttling and anti-shaking
- An introduction to event loops
- The output
async function async1() {
console.log("async1 start");
await async2();
console.log("async1 end");
}
async function async2() {
console.log("async2");
}
console.log("script start");
setTimeout(() = > {
console.log("setTimeout");
}, 0);
async1();
new Promise((resolve) = > {
console.log("promise1");
resolve();
}).then(() = > {
console.log("promise2");
});
console.log("script end");
Copy the code
- Why is 0.1 + 0.2 not equal to 0.3? Why is there an error? How to solve it
- How does large number addition work
- Why does V-for have a key
- Why does Vue’s data have a function instead of an object
- Introduce the virtual DOM
- Diff algorithm
- What is the difference between WebPack and Vite, and what is the migration process like
- What do you think of front-end engineering
Second interview
- I was mainly responsible for the company’s business and technology before
- What is the technology selection and architecture
- Are there efficiency tools in the r&d process
- Which node frameworks do you use, how does memory monitoring work, and which node frameworks do you know about
- Vue and React have read some of the source code, what is the principle of the V-Model, what are the pros and cons of the virtual DOM
- What are typescript’s advantages over JavaScript
- Export and Module. exports
- How are Node memory leaks monitored
- What is the difference between fs.readFile and stream when node reads a file
- What are your strengths and weaknesses
A lot of node monitoring related to chat, to tell the truth, not how contact
zhihu
One side
- Introduce difficult projects
- What problems have you encountered with Vite
- Does Esbuild know about it
- When you break up big projects, do you have any problems that you didn’t have before
- How do you ensure downward compatibility within the group toolkit
- What is the difference between the following two ways of writing, what effect will occur, and if not, how can we get the same effect
export default class App extends React.Component {
state = {
cnt: 0
};
render() {
return (
<>
<button
onClick={()= > {
this.setState({ cnt: this.state.cnt + 1 });
setTimeout(() => {
this.setState({ cnt: this.state.cnt + 1 });
}, 1000);
}}
>
add cnt
</button>
<div>cnt: {this.state.cnt}</div>
</>); }}export default function App() {
const [cnt, setCnt] = useState(0);
return (
<>
<button
onClick={()= > {
setCnt(cnt + 1);
setTimeout(() => {
setCnt(cnt + 1);
}, 1000);
}}
>
add cnt
</button>
<div>cnt: {cnt}</div>
</>
);
}
Copy the code
- Ask the output
const p1 = new Promise((resolve, reject) = > {
setTimeout(() = > {
resolve(1);
throw new Error(a); },2000);
});
const p2 = p1
.then((val) = > {
console.log(val);
return val + 1;
})
.catch((err) = > {
console.log(err);
return err;
});
Promise.all([p2, Promise.reject(3)])
.then((val2) = > {
console.log(val2);
})
.catch((err2) = > {
console.log(err2);
});
Copy the code
- Write a binary tree traversal, depth first and breadth first
- Infer: What does infer do to implement a Pick and a Omit
Second interview
- What are the essential differences between SSR and CSR, Nuxt and DIRECT rendering EJS
- What is the weight of Vue and React
- What problems will PureComponent introduce and when will it be needed
- Vue’s single-file development mode, this explains how vue-loader is implemented.
- What happens if the template language is changed.
- How script tags in.vue files are read by babel-loader since babel-loader can only convert js files.
- How is vue scoped implemented, how does the DOM hash correspond to the style hash, and how is it guaranteed that the hash generated is the same every time
- What is the difference between babel.config.js and.babelrc? When should it be used, and what happens when it is used together
- At what point is the render function invoked by Vue, and by whom is the render triggered by subsequent state changes
- The difference between Vue and React in data update, will Vue’s data hijacking bring additional problems? Is Vue3 optimized for these problems
- What does $set and $forceUpdate do
- How do Vue and React implement asynchronous DOM updates? Are there other ways to do Vue asynchronous updates? Besides MessageChannel, are there any other apis that are similar in use
- How does common code do extraction and determine if a resource should be extracted
- What else does Portal do besides drop components into the corresponding DOM
- How do you make requests? Axios is an isomorphic tool. How does it differentiate between Node and browser environments
- How does AXIos internally convert XHR’s callback to promise’s and handle request exceptions
The second interview asked more details, a lot of local details actually did not pay too much attention to, hung up
Tencent (Watch)
One side
- Implement the OB and Watch methods, hoping to execute them once when the method is passed to the watch function, and then fire the corresponding console each time a property on data is modified
const data = ob({ count: 0.foo: 'test' });
watch(() = > {
console.log('watch-count', data.count);
});
watch(() = > {
console.log('watch-foo', data.foo);
});
data.count += 1;
console.log('showcount', data.count);
delete data.count;
data.foo = 'test2';
Copy the code
- Enter a string. If square brackets are encountered, repeat the string in square brackets n times. N is the number before the square brackets, or 1 if there is no number
const test1 = "a2[b]a2[b2[c]]";
// abbabccbcc
const test2 = "2[3[c]]a2a";
// cccccca2a
const test3 = "[abc][d]3[e2]4";
// abcde2e2e24
Copy the code
Second interview
- How does Vue2 differ from 3, how does it rely on collecting and distributing updates, and how does Vue ensure that parent component rerendering does not result in child rerendering
- How does webpack load and contract asynchronously
- Vite dependencies and prebuild Are all dependencies used merged together or are each individual packages installed with multiple versions of the same package?
- Node process management? What are the options for multiple processes? 4.1 How can worker suspension be detected? 4.2 What is IPC communication? 4.3 If a cluster is used to start multiple processes, is the child process multiple or one port? 4.4 Is a Worker a process? Does it have a separate PID? 5.5 How do I Communicate Data between Processes
- How are Node memory leaks monitored? How does it work? Is memory for monitoring processes or for monitoring dockers?
- What are the ways webpack can play Polyfill
- If http1.1 server needs to process the request in order, then why do the following images appear in a page first? Do you understand HTTP streaming
- What does front-end engineering do? What does git CI/CD do? Like Lint, security checks, cyclomatic complexity? Are lint’s rules customized by your business? Are component and automated tests done? Has the line on line been matched? How to test small traffic online?
- How does Taro build multiplatform compatibility? How does Taro compile the React code into a runtime, what does the runtime look like, and how does it execute in a NATIVE applet DSL
- How to do front-end monitoring alarm, what monitoring indicators are there, what are the alarm strategies, what indicators and dimensions are concerned about, how to monitor the white screen
- What optimizations have been made, how are animations cut, how are FPS monitors
This is really kind of… Difficult, a lot of completely is my knowledge blind area, especially node part and Taro part, hang convinced
jinshan
One side
- What are the main projects I have done
- What are the methods of Vue sibling component transmission
- Introduce Vuex
- Let me introduce the diff algorithm
- Websocket, what does it have to do with HTTP
- An introduction to HTTPS
- Use three positive words and three negative words about yourself
- Tell me about the last book you read
- Have you ever done something that has nothing to do with code but is a little bit more proficient
- What are your expectations for your next job
Second interview
- How you feel about your last company, how you grew up, what you don’t like
- What was the size of the previous team
- What was the business like before
- What are your expectations for your next job
Netease (Lingxi)
One side
- What are your expectations for your next job and what efforts have you made to plan it
- Introduce a difficult task
- Why did you migrate your project from SSR to CSR
- How to determine if next is called multiple times and an error is thrown
- Event loop What happens if new events are continuously generated during the Poll phase of a Node event loop
- How does Node handle json.parse for large strings
- Let’s talk about redraw and rearrange in the browser
- Introduce the composition layer of the browser
- What if a page needs to work on both PC and mobile, and what is the difference between REM and VW solutions
- Typescript defines how an object should be defined, if the key used to define the object must be a string
- What does Watcher cleanDeps do
- How does computed and Watch work
- What do I do if I have an object in data and I don’t want it to be deeply listened on
- Given any two-dimensional array, print all permutations and combinations. Such as
[['A','B'], ['a','b'], ['1', '2']]
And the output['Aa1','Aa2','Ab1','Ab2','Ba1','Ba2','Bb1','Bb2']
- Given any two-dimensional array, output all permutations and combinations of array elements. Such as
[['A', 'B', 'C'],[ 'A1', 'B1', 'C1'],[ 'A2', 'B2']]
And the output["AA1A2", "BA1A2", "CA1A2", "AB1A2", "BB1A2", "CB1A2", "AC1A2", "BC1A2", "CC1A2", "AA1B2", "BA1B2", "CA1B2", "AB1B2", "BB1B2", "CB1B2", "AC1B2", "BC1B2", "CC1B2"]
Second interview
- What does the Node service migration to light service do
- What framework do you use for RPC, the difference between GRPC and thrift, protobuf
- How much does Serverless know about it, what it is suited for, and what has been written in it
- How do you deal with compatibility issues such as inconsistent API versions provided by clients
- What are the problems with webpack migrating Vite? Has Snowpack learned about it and how it differs from Vite
- Are you familiar with React? What are the best practices of hooks
- What performance optimizations have been done
- What are the performance indicators of a page? How do you monitor them? How do you monitor the performance of Node services
- Implement an iterator for sequential traversal in a binary tree with the best time complexity, the worst, and the space complexity
On three sides
- Implement a function that passes in an array where each item represents the starting and ending positions of a line segment, calculates the total length covered by all line segments, and writes test cases
lineCoverage([
[0.1],
[2.3]]);/ / 2
lineCoverage([
[0.2],
[2.3],
[3.4]]);/ / 4
lineCoverage([
[0.2],
[1.3],
[2.4]]);/ / 4
lineCoverage([
[0.5],
[1.3],
[2.4]]);/ / 5
lineCoverage([
[0.6],
[2.6],
[6.7]]);/ / 7
Copy the code
- Calculate the force buckles within a matrix that all 1 cover the region (island problem)
// howManyDots(canvas:number[][]): number
// // Upper, lower, left, and right are regarded as the same
/ / [0, 0 and 3,
/ / (0, 0),
/ / [0, 0]]
/ / = > 1
/ / [,1,0,1 [1],
// [0,0,1,0],
// [0,1,1,0]]
/ / = > 3
/ / [,1,1,1 [1],
// [0,0,0,1],
// [1,0,0,1],
// [1,1,1,1]]
/ / = > 1
Copy the code
Convenient bee
- How does Vue go from modifying properties to rendering to the page
- See the code
/\*\* - Goal: - Implement a simple observer mode (or publish-subscribe mode) \*/const shop = {
apple: 5.// Apples 5 yuan
potato: 2.// Potatoes are 2 yuan
tomato: 3.// Tomatoes 3 yuan
orange: 7.// Oranges 7 yuan
}
/** * Now we have a convenience store instance object, the goal is to need to increase the price of goods monitoring, when the price of goods changes, trigger the corresponding event. * 1. Xiaoming pays attention to the change of apple price * 2. Xiaogang pays attention to the change of orange price * 3
class Pubsub {
constructor() {
}
list = {};
// Add listener, listener, and listener methods,
// prompts that you can use the remove method as the return value of the listening method
listen = (key, listener, callback) = >{}// How to publish messages
publish = (key, price) = > {
/** How to define the publishing method? * * /}}// Specify a Pubsub instance object
const pubsub = new Pubsub();
const event1 = pubsub.listen('apple'.'Ming'.(listener, price) = > {
console.log(`${listener}Watch apple's latest price is${price}Yuan `);
})
const event2 = pubsub.listen('apple'.'jack'.(listener, price) = > {
console.log(`${listener}Watch apple's latest price is${price}Yuan `);
})
const event3 = pubsub.listen('orange'.'xiao gang'.(listener, price) = > {
console.log(`${listener}The latest price of Orange${price}Yuan `);
})
const event4 = pubsub.listen('orange'.'jack'.(listener, price) = > {
console.log(`${listener}The latest price of Orange${price}Yuan `);
})
/** * What logic should be added to enable us to listen for changes in property values in shop? * Tip: How is bidirectional binding implemented in VUE? * Vue2.0 or VUe3.0 implementations are available */
/** We set an observer method to make the shop instance object observable **/
const observable = () = >{};const newShop = observable(shop);
newShop.apple = 6;
/** Apple price change will trigger the event ** console.log will output: The latest price of apple is 6 yuan **/
newShop.tomato = 10;
/** No one cares about the price of tomatoes, no event will be triggered **/
newShop.orange = 11;
/** The latest price of orange is 11 yuan **/
console.log(newShop);
/** ** enter newShop **/
console.log(newShop.apple);
/** ** enter the new apple value of newShop **/
Copy the code
- If you need to achieve scan code login, single sign-on, what is the plan
Do business is not very interested in the follow-up did not continue to face
Kuaishou (Commercial)
- Why did you use SSR before, and why did you migrate from SSR to CSR
- How does an offline package work
- Implement shouldComponentUpdate in hooks. Implement shouldComponentUpdate in hooks. What is the difference between useCallback and useMemo
- Why do you choose VUE on mobile terminal and React on PC? Is there any difference between the two in performance
- What performance optimizations have been made
- What is the rationale behind vite, and are there any issues with migrating vite
- What do you know about Serverless, what’s the implementation behind it, and what have you done with it
- Reverse a linked list
- The complete permutation of a string
The questions are basically answered, the questions are written out, but I don’t know why I failed
Blue lake
One side
- The main technology stack
- How do you collaborate with the client
- Do you know the features of the new Vue version
- Are there any design patterns available at work
- What about typescript decorators? How does a class decorator handle this
- Have you ever used abstract classes
- For example, the difference between Map and object. If you need a dictionary, both of which are in the form of key: value, how should you choose the two
- What is the difference between Map and WeakMap
- Js garbage collection mechanism
- What is the time complexity of binary search, just a brief description of the process, how does O(logN) work out, what is the time complexity of TopK, what is the time complexity of quicksort
- What is the output of this? Who does this refer to
class A {
constructor() {
console.log(this.name); }}class B extends A {
constructor() {
super(a);this.name = "B"; }}const b = new B();
Copy the code
- Enter a binary tree and two nodes and print the last common ancestor of each node
Second interview
- If you were to implement a calculator, what would you think about
A more open question, say and write
On three sides
- Look at what you value more and what interests you about new opportunities
- The current salary
- What sort algorithms have you been exposed to, what’s the idea of merge sort, how many merges have you gone through when you merge an array
- What was the most challenging project
- Did you go through a painful phase
- Are you learning anything new lately
- Is there any engineer in your previous job that you admire or admire
- What is the difference between the front-end cache policy, Last-Modified and ETAG, and what are the applicable scenarios for each
baidu
One side
- Work through each project according to my resume
- Traversal a tree structure, output all leaf nodes
- Write the method that gets the parameters after the URL
It’s a simple round of interviews
Second interview
- What was the main business in your last company? What were you responsible for? What was more iterative
- How did you implement the skin change plan
- How is the internationalization scheme done
- What are the schemes for synchronizing between pages and their application scenarios
- How to solve the problem that different project keys overwrite other people’s keys
- How is the technology selection of the business considered
- Write on/emit/ Off (on/emit/off) 7.1 What should I do if I want to separate the successful and failed methods of the subscriber? 7.2 What should I do if I want to trace the failed methods to which the subscriber reported the error? 7.4 Now we want to add the dot reporting function to all subscribers, and provide the global switch. 7.5 If we need to add a dot to a single subscriber, how do we design
- What if I wanted to add some reporting functionality to all methods on an object
This round of interviews took about an hour and a half, and it was really just adding and adding to one feature, and it was really testing the robustness of the code when you think about it
On three sides
- Why do you consider doing the front end
- What is the core of being a product engineer or software engineer
- Introduce a representative project
- What business are you mainly responsible for? What is the proportion of C-end and B-end of work
- What opportunities have you seen so far? How do you think about your next job? What direction do you want to work in
- What is the overall development process
- What is the pace of work
- Personal strengths and weaknesses
Big xinjiang
One side
- What kind of mentality do you have for your next job? What kind of requirements do you have for your next job
- What kind of business are you interested in and what do you want to do in this business
- If you want a value in the DOM to be bidirectionally bound to a variable in js, how can you do this with native JS? React and Vue do this separately
- What is the difference between proxy and defineProperty, and what are their advantages and disadvantages
- What is the difference between a browser making a request and a Node making a request, and what default behavior does the browser do for making a request
- How to understand threads and processes
- Why is Vite much faster than WebPack, what is the difference between ESM and commonJS, why ESM loads faster, and how to understand ESM static
- What packaging optimization has been done
- What needs to be done in CI/CD to make the process better
- What are you studying recently
Second interview
- Tell me about your business
- Why refactor some projects
- How do you do component libraries, what is your role in them, and how do you deal with the call relationships between components
- Bangs how do you fit
- Have done the monitoring of the process from open to full display of small programs
- Explain your understanding of TDD
- Is it useful for agile development and how effective is it for code quality assurance
- What have you done to improve development efficiency
- What has been done in terms of performance optimization
- How to Study at ordinary times
- What are your considerations for this job change
- What kind of product would you most like to make, regardless of money
Meituan (buying medicine)
One side
- Output, reason, and explain the relationship between the call stack and the scope chain
let a = 3;
function func(a) {
a = 10;
console.log(a);
}
func();
console.log(a);
Copy the code
- Make a Promise. All
- An array becomes a nested object
["a"."b"."c"."d"] = > {a: {b: {c: {d: null}}}}
Copy the code
- Explain the loop of events
- Explain browser rendering: Redraw, rearrange, how to optimize?
- Vue vs. React
Second interview
- What’s your main business in your last company
- What is the focus of technology development on the B and C sides
- How is the technology selection considered
- What are the plans for the next step
- How do you create a technology product
- Please write a lottery program that has an array of staffIds for participating in the lottery. Rule 1: the same employee can not win the lottery repeatedly. Rule 2: each round to execute the lottery program, input is the round to draw the number of winners N, the winner will print out the number
- What are the advantages of migrating Webpack to Vite, what problems have you encountered, and how do you test it after migrating
On three sides
- What part of the business were you responsible for in your last job
- What is the back-end architecture
- How to understand SSR and how to apply it in the project
- What has the B side done? What is the architecture
Netease (Media)
One side
- What do browser request headers and response headers remember and what do they do
- Negotiation cache and strong cache
- What are response headers and cross-domain dependencies, and how have cross-domain dependencies been addressed before
- What is the difference between access-Control-allow-origin and a specified domain name
- Is it allowed to carry cookies across domains? What should I do if I want to carry cookies? If a.com is my domain name, I should send a request to B.com
- What are the differences between host, origin, and refer in the request header
- In what scenarios will an options request be made
- ! In what scenarios is important used, and how are CSS selector weights calculated
- Box model margin overlay, how to solve box collapse, how to create BFC
- Is there any way to return true for a==1&&a==2
- What is the difference between object.create (null) and creating a {} directly
- New what a function does
- An understanding of the event loop
- Vue and React source code read which parts, which is the most impressive
- This section describes the vue-Router mechanism
- The diff algorithm is a brief introduction
- What front-end engineering has done
- How can I gradually reduce typescript errors in projects
- Have you ever written a Webpack plug-in
- What is the principle of Babel conversion
- What performance optimization has been done
- How does offline storage work
- What design patterns have been used
- How to deal with all kinds of online exceptions and how to catch static resource loading failures
- How does Node interprocess communication work
- What is the implementation of the KOA middleware principle
- How do you define the security of a dependent package
- What performance optimizations node has done
Second interview
- What did you do in Git CI, and what was your motivation
- What barrio has done
- What is the ratio of front-end and back-end work in the business
- Have you upgraded to Vue3? What are the advantages of Vue
- Which does Vue or React think is more elegant
- Have you made technical solutions to improve team performance
- What was your greatest growth in your last company
- What is the annual OKR this year
- What are you looking forward to in your next job
On three sides
- Projects with highlights
- What is the scaffold used, have you made the scaffold yourself, what is the principle of Vite, how to distinguish the environment
- Vue3’s composite API
- Do typescript and Vue2 encounter compatibility issues
- Why migrate SSR to CSR
- What is the principle of offline package? Is there any offline package incremental update
- Do you know the bridge principle
- Do you have any knowledge of page exception monitoring
- React optimizations
- What performance optimizations have been done
- Write an EventBus containing emit/on/off
- Highlights from previous jobs
- Has the component library ever done that
Qihoo 360 (Qihoo Dance Company)
One side
- Do more 2B or 2C
- What is the difference between weird mode and standard mode
- How do I perform CSS screen adaptation
- Does the mobile end experience sliding penetration problems
- Have you encountered mobile browser compatibility issues
- Js data types are stored on the stack while reference data types are stored on the heap
- What are the common judgment methods of data types
- What is used in ES6
- What are the methods of Promise
- What is the state of a new Promise returned by the chained call to the Promise’s then
- What are the application scenarios of await and promise
- What is the difference between ESModule and CommonJS? Have you been exposed to other modularity solutions
- What the browser knows, what the kernel has, how many processes are opened when chrome opens a TAB, and which threads are opened
- What are the ways to load JS asynchronously
- Does loading CSS and JS block DOM rendering
- What’s the difference between strong cache and negotiated cache? Does the strong cache communicate with the server? If it doesn’t communicate, does it have a status code
- What are the properties of cookies
- What does Samesite do
- What is the difference between cookie and storage
- What versions of HTTP are available, what is bad about 1.1, what causes queue header blocking, and has 2.0 completely solved queue header blocking
- What’s the difference between get and Post
- What engineering has done
- Vue vs. React
- What is the difference between SSR and CSR? What are the applicable scenarios? What is isomorphism
- Have you ever written a Webpack plugin
- Is Babel configured, preset or plugin has the higher priority
- How does the project code specification work, and how do you avoid someone who skips the code specification locally
- Git commit limitations
- How is the conflict between EsLint and Prettier resolved
- What is the difference between CI and CD besides GITLab’S CI/CD
- Does Docker know anything about it? Does docker actually use it
Second interview
- Before, it was mainly Vue or React, which was used more? Have read some source code
- What’s the difference between Vue3 and previous versions
- How was the applets developed before
- What did Node know about SSR and how did it work before
- What are the expectations of the next job
- What is known about WASM before
- I have a rectangle on the screen, and I have a diagonal line, and if I click on the rectangle, how do I tell if I click on the rectangle above the diagonal, or below the diagonal, or on the diagonal
- If I wanted to draw a diagonal to this rectangle, what could I do
- How was the previous data visualization done
- There is no technical precipitation, such as communication in the technical community or writing articles
- Have you done any administrative work other than coding
- What do you know about Serverless
- What is the demarcation of responsibilities in the current division of work
- What front-end engineering is doing
Tencent music
One side
- What are the main technology stacks
- What are the main businesses
- What are the main technical solutions
- What is the background of SSR migration to CSR, what are the respective advantages, and why does the server render pages faster than the client
- What are the first screen performance optimizations
- Which protocols have been used
- What are the accessibility challenges and how are screen reader features implemented
- What internationalization has done
- What aspects of refactoring have been done, and what optimizations have been made for refactoring
- What problems webpack encountered in migrating Vite
- What you know about Serverless and what you do with it
- What is the process of test-driven development, and what can be done to improve TDD efficiency
- What are the problems with front-end security
- Explain the HTTPS
- What are the common HTTP status codes
- Are you familiar with the browser process model
- What is the browser rendering flow
- An introduction to event loops
- What is the implementation principle of Vue slots
- What performance optimizations have been made
Second interview
- Vue or React
- What are the advantages of Vue’s composite API
- What are the general ways to encapsulate repetitive logic in Vue2
- If you need to display UI components by calling apis, how to do this (e.g. Toast, Dialog)
- The differences and usage scenarios between useCallback and useMemo
- To package a common component or tool, you generally need to produce what paradigms of files
- What is the difference between commonJS and ESM module import and load execution
- How does node call RPC and what do we know about thrift
- What are the advantages of SSR and CSR
- What framework does Node use
- What solutions can be optimized if the page becomes jammed due to a large number of DOM updates
- How does the skin change program work
- If you execute location.href = url in js, what are the security implications of this behavior
- CSRF principle, what is the overall attack link, what are the solutions
- What are the methods of XSS and what should be filtered if any
On three sides
The interviewer didn’t apologize for being late for five minutes. He asked me to turn on the camera but didn’t turn it on by myself. He kept puA during the whole interview. Here’s what the interviewer said
I don't have any difficulty in understanding your project. You haven't done the client before, and you don't understand why you need to solve the problem of many errors in the code. I understand that the programmer of Toutiao probably won't write the code with errors all the time. I just don't think toutiao is really helpful for your growth and the architecture itself is problematic and I think you still have a lot of problems with the basic computer thinking and I have a lot of programmers from Toutiao who have used this, how come you haven't used itCopy the code
Microsoft China
One side
- Why do you choose to do the front-end industry
- What is the difference between Vue and React
- Describes a previously refactored project
- Pros and cons of typescript
- Have you ever experienced a situation where a requirement was impossible or difficult to implement, and how did you handle it
- The most challenging problem I’ve ever done
- To achieve a similar wechat chat list page layout, have the following requirements
1.There is a suction top column, the internal content does not need to be implemented2.A button bar with a suction bottom, there are four buttons inside, button function does not need to do, only need to achieve layout3.The middle list is scrollable// If fixed layout is used, the scroll bar will be full screen
// But if you use absolute and limit the screen height to 100%, you can limit the scrollbar to the middle and even hide the scrollbar
// Pay more attention to these details, as well as BEM naming, 1px border, etc
Copy the code
- Longest increasing subsequence forcings
- Longest continuous increasing subsequence forcings
Second interview
- What are the main businesses I did before
- What is the size and division of labor of the team
- Previous projects that were challenging
- Why should SSR migrate to CSR? If not, how can WE achieve the effect of CSR offline package
- Search rotation sort array forcings
On three sides
- Previous projects that were challenging
- Vue vs. React
- Vue data bidirectional binding principle
- Which Vue lifecycles are triggered the first time a page loads
- Do you know the filter principle of Vue? If you need to implement a filter, which can realize the function of capitalizing the first letter of a string, how do you do it? What I really wanted was a method of ‘ABC’ => ‘ABC’, but the interviewer was positive about my implementation)
- Use CSS to create a Tooltip: there is a Button on the interface. Hover hover displays a Tooltip with rounded corners and a small triangle below
- An understanding of closures, their application scenarios and disadvantages
- What happens from entering the URL to rendering the page
- English test (to tell the truth, I did not understand, my English level is very poor, directly kneel)
All around
- Projects that have been challenging
- What barrio has done
- Merges two ordered array force clasps
- The interviewer asked me what the time complexity was, and I said O(n). The interviewer asked me if there was a way to solve this problem, and I said I could loop backwards based on the old way. The interviewer asked me why the time complexity of pop is O(1). I said I didn’t know. The interviewer gave me time to learn about the amortization algorithm.
Five surface
- Expectations of your next job
- Projects with challenges
- The reasons for SSR CSR migration and the problems encountered
- The interviewer told me how to achieve O(1) for every query and deletion without Map. I had no idea. The interviewer asked me what to use for query O(1), I said hash, and what to use for insert and delete O(1). The interviewer suggested that I could use a two-way list, and I made it.)
Six sides
- English self introduction
- Why do you choose to do the front end, what is the motivation of doing the front end
- What have you done in pursuit of the ultimate experience
- What indicators will be concerned about and how to do detection
- What was the iteration speed in previous work
- Where do you see yourself in the next three to five years
- Have you done an automated test plan? How to do an automated test for compatibility
- How can YOU effectively test for UX restore
- If a PC page needs to be adapted to a mobile phone screen, what needs to be paid attention to, what problems may need to be solved, and how to test
Quick Hand (advertising)
- What are the main technology stacks
- What are the difficulties of the previous refactoring projects
- What are the considerations behind the move from SSR to CSR
- What is the approximate size of the project
- After project optimization or reconstruction, generally from what aspects to evaluate the effect is good or bad
- Do you know the principle of bridge, do you have any problems, and do you have any special treatment in some scenes without bridge
- Have you ever made an evocation app? Have you ever met any problems? How to judge whether the evocation is successful
- What is the approach to internationalization
- How does the skin change program work
- What are the differences between small program and H5? Have you seen how the bottom of small program is implemented
- Why do you want to do Vite migration, migration has encountered any problems
- Write a react-hooks system that counts back to start, pause, restart, isRunning
- Implement a method that requests the URL by passing in an array of urls and a number, and limits the maximum number of requests based on the number
Tencent (Advertising)
One side
- What are your expectations for your next job
- React read the source code
- Vue vs. React
- What is the difference between Proxy and DefineProperty in Vue
- Vue – principle of the router
- Are there best practices for mixing JS and TS development
- Why is Vite faster than Webpack
- What are the similarities and differences between Rollup and Webpack results
- Ask the output to explain the relationship between the function call stack and the scope chain
function bar() {
console.log(project);
}
function foo() {
var project = 'foo';
bar();
}
var project = 'global';
foo();
Copy the code
- Ask the output, if you want to print 123 in the loop, what can be changed
for(var i = 0; i < 3; i++){
setTimeout(() = > {
console.log(new Date, i);
}, 1000);
}
console.log(new Date,i);
Copy the code
- How to understand asynchrony of JS
- How do I understand closures
- Find the length of the longest unrepeated string of a string
- Determines whether an object is a circular reference object
- How is the esLint specification specified within the team
- What happens from entering the URL to rendering the page
Second interview
- Main business responsibilities
- How does the skin change program work
- How does the internationalization program work and what languages are included
- What is the principle of the offline package solution
- What does Node mainly do
- What are the security problems encountered? How is CSRF signing done
- Unidirectional list inversion
- Quick sort
On three sides
- What business are you responsible for
- Do you have any experience with people
- Prints the index of the second most frequent element in the array
- The difference between idempotent and non-idempotent
- Get requests whether images can be uploaded
- Have you encountered front-end security issues
- How to deal with online problems