I saw the demand for the job that afternoon and asked someone to make an internal recommendation. Before leaving work, I received an email saying that I would contact you for an interview within seven working days. On the way home, I got a call from Ali’s interviewer asking for a phone interview. Since I was outside at that time, I was not very convenient, so I told the interviewer to come back home in 10 minutes for the interview. The interviewer agreed and thanked the interviewer. The interview started in 10 minutes. Actually, I have already put on the earphones and got ready. Haha.

  • Introduce yourself and briefly talk about what technologies were used in past projects, what technical difficulties were there and how to solve them?

  • Var, let, const. Var, as the way to define variables in ES5, will have the problem of variable promotion, and the scope is not clear. ES6 introduces lets and const. Let is used to define variables, const is used to define constants, must be defined before use, there is no problem with variable promotion.

  • How to center a block vertically in the browser? How many ways are there? (1) Absolute positioning

.parent{
    position:relative;
}
.child{
    position:absolute;
    top:50%;
    left:50%;
    width:200px;
    height:200;
    margin-left:-100px;
    margin-top:-100px;
}
Copy the code

(2) Same positioning

.parent{
    position:relative;
}
.child{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
}
Copy the code

(3) Positioning

.parent{
    position:relative;
}
.child{
    position:absolute;
    top:0;
    left:0;
    bottom:0;
    right:0;
    margin:auto;
}
Copy the code

(4) When the element to be centered is inline or inline-block

.parent{
    display:table-cell;
    text-align:center;
    vertical-align:middle;
}
Copy the code

(5) the flex layout

.parent{
    display:flex;
    justify-content:center;
    align-items: center;
}
Copy the code
  • How do you feel about modularity? The difference between CMD and AMD? What other loading methods are available besides AMD and CMD? How does Node load modules? CommonJs? ES6 loading mode. In CMD, only require a module when it is used. There are some differences in syntax. RequireJS and SeaJS support each other’s writing methods. The biggest difference between AMD and CMD is that the execution time of dependent modules is handled differently, not the loading time or the way. All load asynchronously. Detailed explanation from the Internet to find an article talking about modular understanding
  • What happens when you type in your browser’s address bar? What are the specific processes?

    A:
    • 1. The browser starts a thread to process the request, and determines that the URL is processed in Web mode if it is HTTP.
    • 2. Call the corresponding method in the browser kernel, such as the loadUrl method in WebView.
    • 3. Obtain the IP address through DNS resolution and set the UA to send the second GET request.
    • 4. During the HTTP session, the client sends the request header.
    • 5. Access the Web Server on the Web Server, such as Apache, Tomcat, and Node.JS.
    • 6. Access the deployed back-end applications, such as PHP, Java, JavaScript, and Python, and find the corresponding request processing.
    • 7. In the feedback header, if the browser has accessed it and there is a corresponding resource in the cache, it compares the time with the last modification time of the server. If the time is consistent, 304 is returned.
    • 8. The browser starts downloading the HTML document (response header, status code 200), using the cache;
    • 9. Document tree establishment, according to the mark request required to specify the MIME type of files (such as CSS, JS), and set cookies;
    • 10. The page starts rendering DOM, JS manipulates DOM according to DOM API, performs event binding, etc. The page display is complete.

The browser sends the requested URL to the DNS for domain name resolution, finds the real IP address, and sends the request to the server. The server to the background processing completed after the return of data, browser to receive files (HTML, JS, CSS, images, etc.); The browser parses the loaded resources (HTML, JS, CSS, etc.) and establishes the corresponding internal data structure (such as HTML DOM). Load the parsed resource file, render the page, and finish.

  • The differences, advantages and disadvantages of Grunt, gulp and Webpack

  • Can less be calculated? can

  • Browser kernel, components?

  • Git reset and rebase Git rollback command (Git rollback command) Git revert commitID,rebase merge commit history, reset undo recent commit.

  • What are the common browser compatibility methods? What compatibility issues have you encountered?

  • Student: Variable promotion? The difference between function declarations and function expressions

// Function declarationfunction A() {... } // Function expression var change=function(){
    ...
}
Copy the code
  • What’s behind Flex? What are the compatible methods?
  • How to solve cross-domain problems? (1) CORS, the server needs to set the header: Access-control-allow-origin (2) jSONP, which requires the target server to coordinate with a callback function (3) postMessage+iframe, which requires the target server or the target page to write a postMessage, mainly focusing on front-end communication. (4) Nginx reverse proxy, need to build an Nginx server for forwarding requests. (5) window.name+iframe, which requires the target server to respond window.name (6) window.location.hash+iframe also requires the target server to process.

I can’t remember a lot of questions. We talked back and forth for about an hour. The first telephone interview took so long. Ha ha

Some of the answers may not be accurate, I hope you light spray. Gold digging technical certificate activity link :juejin.cn/post/1