Tencent official website
Basically all the examiners out of the scene questions, more meng, at the end of the project to ask what difficulties feel, how to solve, the project talked for ten minutes, the whole one hour
Once passed, I think it is luck, the algorithm answer is relatively poor (or more brush force buckle)
Scenario questions
-
Function People(num) {var age = num; this.getAge = function() { return age; }; this.addAge = function() { age++; }; } var lionel = new People(23); lionel.addAge(); console.log(lionel.age); console.log(lionel.getAge()); var karma = new People(20); console.log(karma.getAge()); // Print what? undefined 24 20Copy the code
-
Implement a quicksort
- The algorithm just dictates how to do it, right
-
Handwriting algorithm: there are two ways to go up the stairs, one is a step up, one is a step up. If I were to tell you how many steps there are in a staircase, how many different ways would you go up it? For example, there are three steps and there are three ways to climb the stairs. One level at a time, one level at a time, and two levels at a time.
-
Add (“1234”, “4321”) = “5555”
- Didn’t write
-
Arr = [{a: 1}, {a: 2}, {a: 2}, {a: 2}
-
arr.sort((a, b) => a.a - b.a) Copy the code
-
-
HTML + CSS, to achieve a up and down around the center of the red square
- I hand-wrote an elastic layout and used it
justify-content
align-items
Two attributes, examiners did not look at other methods
- I hand-wrote an elastic layout and used it
Q&a (Basics)
- What is HTTP?
- What are HTTP headers?
- Which HTTP headers are used to implement cross-domain?
- What is the method of cross-domain, talking about CORS and JSONP principle
- Project: Briefly talked about the login implementation, THE token I use (here feel can prepare some good points in advance, easy to show)
Tencent official website two
This time the algorithm asked a two – face, relative to the last time a little more smoothly. First of all, we will introduce the question and answer from the project, and then we will mainly ask about the knowledge points related to the interview. It will last for 50 minutes.
The second side hung up, although the feeling is better than a side answer
-
How to solve the project difficulties?
- Every time I talk about the login function, I understand, but also convenient for the examiner to continue to extend the question. This time I directly talked about the main login methods, and then also talked about how the front and back end interaction, how to get data, HTTP request
-
How to distinguish front – end separated from non – separated items?
- Separation: each plays its own role, front-end adjustment interface; No separation: the back end renders the entire page before sending it to the front end
-
Cache, how do you control the cache? Pragma, cache-control, Pragma, cache-control
-
The examiner mentioned a mouth TS, I said no and did not ask
-
How does mobile and PC fit together? Limited energy, a set of code to get a response; Big companies can have two sets of code
-
How to solve the problem of different CSS styles caused by different browsers? Write a public file that defines the values for the basic styles, and use this file to reset the styles no matter which browser opens them
-
What is the flow of entering url to render page? (Details the TCP three-way handshake)
-
What’s the difference between HTTP and HTTPS? I talked more simple, after the interview questions, the examiner mentioned ports, verification, etc
-
Finally, I asked an algorithm
-
STR = "aa a bee dd ee" => STR = "a aa bee dd ee" // Return str.split(" ").sort().join(" ")Copy the code
-