Remember the first interview|Ali Dianping|Front-end development engineer

I simply posted my resume in the morning, but I didn't expect that the Ali interviewer would call and ask for an interview in the evening.
I was very nervous when I first received the call and asked if I could prepare for 10 minutes.
The interviewer said that call me later.
After ten minutes, he called, but he didn't really prepare much. Can only bite the bullet and start the interview.

Note: Speak confidently and clearly, don't hesitate, and don't laugh when answering questions.

1. Introduce yourself,

Introduced my own situation. Speaking of starting to learn the front-end, the interviewer asked the first question:

Q1 Why do you want to be a front-end?

My answer is vague. Compared with the back-end visualization, I feel that there are a lot of things that can be studied and studied in depth.
I feel that this is a question that needs to be prepared in the future.

Q2 What can be learned in-depth on the front-end

I talked about my own learning feelings

2. Ask the knowledge points

Q1 How many ways does JS declare variables?

var let const。

Q2 What is the difference between them?

Reference answer

Q3 If you define a const array now, can you modify it, such as adding an element?

Can't

Q4 Have you ever used arrow functions? What is the difference with ordinary functions?

Used, this point is different, the function body is not the same, the arrow function is an anonymous function, can not be used as a constructor function can not be new to
open the answer

Q5 Have you used Generator?

No
reference answer

Q6 Do you know about cross-domain? What is cross-domain?

When sending the request, the protocol, port, and domain name are different from the current one

Q7 How to solve cross-domain

docment.domain
window.postmessage
reference answer

Q8 Can document.domain be used for all cross-domains?

No, refer to answer
refer to answer 2

Q9 How to solve other types of cross-domain?

cors reference answer

Q10 What is this for?

Cross-domain resource sharing

Q11 How does postmessage work?

I forgot, I don’t actually refer to the answer

Q12 What are the ways to cache the front end of the browser? What is the difference between them? What about other storage methods?

Cookies act on the client side, you can set the expiration time, the session exists on the server side, there will be no data when it is closed, and the local storage always exists.
Other do not understand the
reference answer

Algorithm knowledge

Q13 Let’s talk about bubble sorting. What is the time complexity? why? Is there any other complexity situation?

Roughly gave an example of sorting, the square of O, said that it is because there are two for loops.
Don't know other circumstances.
Reference answer

Q14 Is there a faster sorting than bubbling? Talk about fast queue

Fast queue, forgot to refer to the answer

Q15 I asked the longest substring without repeated characters in the third question of Likou

Using a sliding window, and then said vaguely, it was not clear.

Puzzle

A 3l and a 5l water cup measure 4l of water strategy

This is out. thought long time.

How many blocks can be divided by dividing a plane with 2021 lines?

No answer

Let me ask questions

Asked the interviewer’s suggestions for this interview:

Be prepared for the unanswered questions just now

I asked this time, but will I be blocked?

probably not

The next day I received an email saying that I had not passed the interview.
Generally speaking, the questions in this interview are very basic and simple. There are two reasons why my answer is not good. First, the first interview was very stressful, and the brain was blank at the beginning, and secondly, my knowledge base was too poor.
So recently I have to start to grasp the basics and brush the interview questions. Rush

Guess you like

Origin blog.csdn.net/weixin_43902063/article/details/114647290