Summarize the most common problems in the front-end interview process

foreword

When the front-end personnel are interviewing outside, what are the places where the general technical personnel will inspect us? I might as well sum it up here! (PS: After this is made public, it will be convenient for the interviewer. However, if you are a company technician or an interviewer, you may wish to revise the title and be flexible!)

javascript common problems

1. How do you understand the prototype of js? How do you understand the inheritance of js? Can you give an example of inheritance in js?

 On this topic, you can take a look at my previous article  http://www.haorooms.com/post/js_constructor_pro . Understand the prototype prototype. Regarding inheritance, it is mainly the inheritance of the js prototype chain. The understanding and examples of inheritance (I will not introduce it in detail here. After a brief introduction, even if you have memorized it, you may not necessarily understand it, and it is unfair to the company). I still recommend the interviewee to read a book "[Advanced JavaScript Programming (3rd Edition)]", this book is very detailed about js. On this topic, you can read the sixth chapter of it! After reading it carefully, I believe you can understand it and say it simply!

Regarding the inheritance of js, it is indeed the key and difficult point. I have written two blogs, you can read them: http://www.haorooms.com/post/js_lei_jicheng

http://www.haorooms.com/post/js_jc_lei2

 

Second, js closure? Give an example and explain its main function!

Regarding closures, it really refers to a function that has access to variables in the scope of another function. Specifically, I have written an article before, you can take a look!

Understanding of javascript closure  http://www.haorooms.com/post/js_bb

Introduction to javascript closures (2): http://www.haorooms.com/post/js_bbtwo

 

3. What are the main methods of js array? Do you understand the main parameters?

You can check the specific, commonly used are as follows:

1. shift(): delete the first element of the array and return the deleted value. here is 0

2. unshift(3,4): Load the parameters to the front of the array and return the length of the array. Now list: is 3,4,0,1,2

3. pop(): deletes the last element of the array and returns the deleted value. Here is 2.

4. push(3): Load the parameters to the end of the array and return the length of the array. Now in the List: 0,1,2,3

5. concat(3,4): Concatenate the two arrays.

6. splice(start,deleteCount,val1,val2,...): delete the deleteCount item from the start position, and insert val1, val2,...

7, reverse: reverse the array

var a =[1,2,3,4,5];var b = a.reverse();//a:[5,4,3,2,1] b:[5,4,3,2,1] 

8. sort(orderfunction): sort the array according to the specified parameters var a = [1,2,3,4,5]; var b = a.sort(); //a: [1,2,3, 4,5] b: [1,2,3,4,5]

9. slice(start,end): Returns a new array composed of items from the specified start subscript to the end subscript in the original array

var a =[1,2,3,4,5];var b = a.slice(2,5);//a:[1,2,3,4,5] b:[3,4,5]

 

Fourth, the method of js iteration

every(), fliter(), forEach(), map(), some() can be checked for details!

 

Five, js array deduplication and sorting

I will not describe in detail.

 

Six, js regular expression

About regular: http://www.haorooms.com/post/js_regex_refuse  , this article should be enough for interviews!

Let you write a simple regular, remove the left and right spaces from the string. See my previous article for details http://www.haorooms.com/post/js_kong_ge

 

About regular, you can go to learn about it!

Seven, pure js ajax request principle

You can inquire and find out! Look at these articles http://www.haorooms.com/post/js_ajax_chun  and http://www.haorooms.com/post/js_shixian_jquery  Finally, about the js implementation of ajax, the latest fetch method of js is released, which is very good of!

 

Eight, js modularization

You can read my previous article: http://www.haorooms.com/post/js_require_zz

 

Nine, double equals implicit conversion

See the article for details: http://www.haorooms.com/post/js_yinxinleixing

 

Ten, js operators, string interception, etc.

For details, please see: http://www.haorooms.com/post/js_czf_mst

String interception, the difference between substr, substring, etc.

11. The difference between call and apply() in inheritance in js

 

The usage is similar, but the parameters passed are different. For details, you can check it online, or read my article  http://www.haorooms.com/post/js_constructor_pro

 

Twelve, the method of converting class array to array

Array.prototype.slice.call(arguments);

 

13. The cookie does not set an expiration time. What is the default expiration time?

Close the browser and it's over

 

14. What are the ways to change the length of an array?

shift、unshift、pop、push

 

15. js event loop event loop

Please see the article: http://www.haorooms.com/post/js_xiancheng

 

Sixteen, the difference between require and import

See the article: http://blog.csdn.net/qq_28702545/article/details/54892562

jQuery common problems

1. Have you studied the jquery source code?

 

2. Have you written the jquery plug-in, and how to write it in general?

You can read one of my previous articles: http://www.haorooms.com/post/js_jquery_chajian

 

3. The difference between jquery's bind(), live(), delegate(), on()

You can search online and have a look!

 

Front-end common problems

1. How to deal with cross-domain?

jsonp, etc., you can look at the  browser cross-domain access solution I wrote

 

Second, how to deal with the cache? How to clear cache.

Ajax random numbers, ajax parameters, settings in meta, etc. You can look at the js I wrote  several ways to clear the browser cache

 

3. HTTP request problem, what three parts are the HTTP request information composed of?

1、请求方法URI协议/版本(例如:GET/haorooms.jspHTTP/1.12、请求头(RequestHeader)(例如:Accept:image/gif.image/jpeg.*/* Accept-Language:zh-cn Connection:Keep-Alive Host:localhost等等)
3、请求正文 

Regarding the request for pictures, you can see my previous article  http://www.haorooms.com/post/web_http_request

 

Fourth, the front-end performance optimization problem, how do you deal with the front-end performance problem?

See my previous article: http://www.haorooms.com/post/web_xnyh_jscss  and  front-end performance optimization supplement

 

5. How to compress website js and css? What methods are there?

For details on ant+yuicompressor, see my previous article: http://www.haorooms.com/post/ant_yuicom

ant:http://www.haorooms.com/tools/ant_book/

SASS, etc. can automatically compress css!

Can also be done with the Grunt build tool. You can look at  the grunt of the compression and merger of front-end js and css

 

6. Which css plugins are used?

bootstrap,animate.css 等

 

Seven, let yourself build a website, how do you do the architecture?

Examine front-end architecture capabilities.

 

8. Do you understand some status codes?

200 success class, 300 redirect class, 400 client class, 500 server class. Check it out online!

 

9. How to use the browser to debug the code?

Google Chrome, Firefox, IE, etc. (Students who do not understand can check it online)

 

10. The method of converting json string to json

For details, please see: http://www.haorooms.com/post/js_jsons_h

http://www.haorooms.com/post/json_object_json_string

 

html+css+html5+css3 FAQ

1. If a page is fixed on the left and adaptive on the right, how do you do it?

There are many methods, generally margin and floating, you can check it online for details. Simple.

 

2. What are the new tags and features of html5?

There are many html5 tags, you can check them online.

 

3. What are your commonly used css3? Say what you remember.

Hahaha, this is a lot, you have to review CSS3 including its animation and so on.

 

4. How to deal with browser compatibility issues?

Please see: http://www.haorooms.com/post/IE_jianrong

 

5. How to use CSS to beautify button styles such as radio and checkbox?

For details, see one of my articles: http://www.haorooms.com/post/css_mh_ck_radio

 

web touch FAQ

1. What are the compatibility issues of long-term mobile website?

Take a look at the related articles on the mobile website .

 

2. How does the website adapt? How to make a responsive website?

You can chat casually. You can take a look at http://www.haorooms.com/post/css3media

 

3. What are the problems in the use of zepto.js? Have you used jquerymobile? What problems will there be?

If you have used it, feel free to chat!

 

bonus

For example, you talk about databases, count how to use mongo for paging, etc., including mysql databases and so on.

Talking about linux system, linux commonly used commands.

Talk about angularjs, vue.js, angularjs instructions, two-way data binding. The difference between MVVM mode and mvc mode and mvp mode.

Talk about the front-end architecture, and jello of Baidu fits.

Talk about the commonly used version control tools git or SVN, talk about the commands commonly used by git, how to roll back git to a certain version ( $ git reset --hard a certain version number)

Personnel interview

There is a difference between a personnel interview and a technical interview. Personnel generally asks some general and summary questions. Let me give some examples below!

1. You have done so many projects, which project impressed you the most? What did you learn from it? Why do you feel the deepest?

2. Doing front-end development for so many years? Tell us how you feel!

Third, briefly introduce yourself.

4. What do you need to know about the company?

5. When it comes to salary, reasons for leaving, and plans for the next few years, etc., I won't go into details here.

The above are some of the most frequently asked questions during my interview process. Note: You must be sincere during the interview, don't lie, what is it, the reason I listed the above topics is that some front-end personnel may be very skilled, but they are nervous and unprepared during the interview. This way, after you are simply prepared, you can play your normal level! Friends, come on!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326301942&siteId=291194637