okay, it’s me again.

Ha ha ha HA I how also did not think, I will experience more than a three, this can be said to be hard according to the friction on the ground, no way, can only pursue consistent “technology is not enough, brag to gather together” principle

BTW should read other people’s interviews more than write his own, but writing his own can also be a good counterpoint

This time it is a company preparing to go public, the company’s technology department is also quite strong, so there will be three possibilities

In fact, I’m not sure what I remember during the second interview. I can only say that I want to write it down bit by bit. It is recommended to record the whole interview process so as to make a thorough second interview, of course, it is best to get the consent of the interviewer

Interview process: boss direct interview -> email invitation for interview -> one technical interview -> two technical interviews -> three HR interviews -> telephone communication about salary and entry matters -> offer

One technical side

  1. To introduce myself

  2. A business scenario, PC side with vUE do background management system, general routing is dynamically generated, front-end files and routing is one to one correspondence, if accidentally deleted a file, this time will jump 404 pages, there will be bad user experience, how to do better to prevent jumping 404 pages?

  3. There is a page, a background image that is absolutely long, and we know that if we don’t set the height of the box to 100% by default, the height of the box will be stretched out by the content. So how do you make the background image fully visible on the first screen and still visible on the second screen?

    Ok, here’s my first wrong answer 🤣

    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .container {
            width: 100%;
            height: 100vh;
            background-image: url('./assets/images/long.jpeg');
        }
    </style>
    
    <body>
        <div class="container">
          <p>1</p>I'm going to copy enough here<p>1</p>Ok, I'm not going to take up too much space by Posting duplicate code</div>
    </body>
    
    Copy the code

    This is what the first screen looks like. Yeah, great. No problem at all! But when we mouse to the second screen oh huo 🙈

Then my second answer is: the picture is absolutely positioned, so that the picture can adapt to no matter how many screens, but the picture is absolutely positioned, there is no content support, so the first screen will not appear at all the background, so this is not 😅

答案 : height: 100vh; With min – height: 100 vh; Can 😂

  1. We all know that the minimum size of a font in Chrome is 12px, even if you set font size: 8px; I have a requirement for 8px font, how can I break the 12px limit?

    The basic principle is to use cSS3’s transform: scale(); attribute

    Font-size: 16px; The transform: scale (0.5); Can be

  2. Talk about the new ES6 features

  3. Talk about some of the array methods that you often use

  4. Front-end performance optimization

    Portal: Talk about front-end performance optimization

  5. Prototype chain

    Portals: Inheritance and prototype chains

    Function, Object, null, etc

  6. Assume that in a box where all the smaller boxes are of equal width and height (photoshop is bad, drawing is not equal) and the larger box fits exactly 7 smaller boxes, use CSS to achieve the following layout

  1. Let’s talk about the wechat login process

  2. How to add Authorization Token to each request? (Look at the wrapper request, axios interceptor)

  3. Talk about vUE’s bidirectional data binding

  4. Mobile terminal to prevent repeated click, shake throttling

  5. How to trigger the BFC and what are the application scenarios?

  6. What states does a Promise have?

  7. If you were given a task to do major development, the architecture was set up, and the UI design was done, what would your first step be?

  8. How does background management system do permission allocation?

  9. How do I tell if an object is empty?

  10. The sum of the numbers 1 to 50, instead of the for loop, write it recursively

    Because I’m so resistant to writing code on the spot and thinking about the sum of 1-50 why not use a for loop, wouldn’t it be faster to use a for loop? Why do we use recursion? But the interviewer handed over the paper and pen, and had no choice but to stick to it. However, this is also a very simple question, and the code written at that time is posted below (wrong).

        // This is wrong this is wrong this is wrong
        function add(n) {
            let sum = 0;
            
            if (n > 0) {
                sum += add(n - 1);
            } else {
                returnsum; }}// This is based on the above improved writing method
        function add(n, sum) {
          if (n > 0) {
            return add(n - 1, (sum += n));
          } else {
            returnsum; }}// There is, of course, a more elegant and simpler way of writing
        function add(n) {
          return n === 0 ? 0 : n + add(n - 1);
        }
        
        // If you want one line of code
        const add = (n) = > (n === 0 ? 0 : n + add(n - 1));
    Copy the code
  11. How to solve the problem that data in VUex is lost after page refresh?

  12. There are several ways for vUE components to communicate (cliche)

  13. Talk about the respective life cycles of Vue and wechat applets

  14. Look at the TS problem

        let num: string = '1'; Let's go to numberCopy the code
  15. Let’s say how many total data types there are for TS

Second technical side

  1. Encapsulate a cascading component. Let’s talk about the idea

  2. Encapsulation v – model

  3. How many content-Types are there for POST requests?

  4. css flex: 1; It’s a combination of properties

  5. – vue provide/inject data will not be recycled back to the parent component in time

  6. How do I implement a promise.all () method without a Promise

  7. [1, 2, 3]. Map (item, index) => parseInt(item, index)

    ParseInt () = parseInt(); parseInt() = parseInt()

  8. What is the difference between cookie, sessionStorage and localStorage?

  9. There are two websites, www.xxx.com (website A) and www.api.xxx.com (website B). The login authorization in website B has obtained the cookie. How can I get the cookie in website A?

  10. ForEach, map, for… in, for… The difference of

  11. Git fetch and Git pull

    Git pull: This is equivalent to getting the latest version remotely and merging it locally

    Git Fetch: It is equivalent to fetching the latest version from remote to local

    The difference is whether you merge automatically

On three sides by HR

I’m not going to expand it here, but the HR side is pretty much all that stuff

The above

In fact, there are many questions I haven’t written down in the first and second interviews, but because there was no recording at that time, I only remember so much

Strictly speaking, this is not much of an interview, many of the above are just questions, because of technical reasons did not make corresponding answers, or some regrets

The last

If there are any mistakes, please correct them