Senior front-end Engineer Interview – 高级前端工程师面试准备知识清单

如果格式、图片有问题,欢迎查看原文(可能会有更新、也欢迎交流):《Senior front-end Engineer Interview – 高级前端工程师面试准备知识清单》

最近接到一个偏前端的面试通知,作为一个老司机,突然发现无从下手,前端不就是HTML + CSS + JS三件套嘛,好像什么都挺清楚的,但是深入一想,好像知识体系还是非常模糊的,这里特地整理下材料,希望对大家有帮助。

当然我在海外,不知道适应国内的情况不。

一、基础知识

第一步,三件套大保健(HTML + CSS + JS)的基础知识需要过一遍,最好嘛从头看一遍,找找自己哪些地方不是很清晰的,其实即便你做了很久的前端,很多基础非常有可能依旧不是很清楚。

看W3C或者我找到一个网站有知识的整理,还不错:http://www.runoob.com/html/html-tutorial.html

以下是我找到的一些问题,复习完基础之后,可以试试。

Javascript

JS是前端唯一的,可以在面试中挖掘你水平的语言,所以需要非常深入的了解。以下几个知识点可以用于自我检测:

Execution context, especially lexical scope and closures.

Hoisting, function & block scoping and function expressions & declarations.

Binding – specifically call, bind, apply and lexical this.

Object prototypes, constructors and mixins.

Composition and high order functions.

Event delegation and bubbling.

Type Coercion using typeof, instanceof and Object.prototype.toString.

Handling asynchronous calls with callbacks, promises, await and async.

When to use function declarations and expressions.

What does the $ represent when using jQuery?

Explain the this keyword and it’s behaviour in JS.

What is the difference between the DOMContentLoaded and window.load events?

This This This!!!!

Prototype

DOM

这块其实概念很简单,但是很多时候我们用Jquery或者其他framework来处理,所以可能会非常不熟悉。

Selecting or finding nodes using document.querySelector and in older browsers document.getElementsByClassName.

Traversal up and down – Node.parentNode, Node.firstChild, Node.lastChild and Node.childNodes.

Traversal left and right – Node.previousSibling and Node.nextSibling.

Manipulation – add, remove, copy, and create nodes in the DOM tree. You should know operations such as how to change the text content of a node and toggle, remove or add a CSS classname.

Performance – touching the DOM can be expensive when you have many nodes, you should at least know about document fragments and node caching.

CSS

Layout – sitting elements next to each other and how to place elements in two columns vs three columns.

Knowledge demonstration questions and quizzes (Explain the box model, create a tooltip plugin, describe the different values of CSS position)

Responsive design – changing an element’s dimensions based on the browser width size.

Adaptive design – changing an element’s dimensions based on specific break points.

Specificity – how to calculate a selector’s specificity and how the cascade affects attributes.

Appropriate namespacing and naming of classnames.

What is the difference between display: block, display: inline and display: inline-block?

Explain the box-model and how it affects various CSS properties.

What is a normal HTTP request made up of?

What is BEM and explain why using something like it could be useful in your CSS?

position: relative, position: absolute and position: fixed

HTML

Semantic markup.

Tag attributes, such as disabled, async, defer and when to use data-*.

Knowing how to declare your doctype (most people are not writing new pages every day and forget this) and what meta tags are available to use.

Accessibility concerns, for example, making sure an input checkbox has a larger responding area (use label “for”). Also, role=”button”, role=”presentation”, etc.

二、提高篇

作为senior的工程师,光会大保健肯定不行,面试的时候还有cache,系统设计,proformance优化、算法等。在这里整理下相关知识:

Critical rendering path.

Service workers.

Image optimizations.

Lazy loading and bundle splitting.

General implications of HTTP/2 and server-push.

When to prefetch and preload resources.

Reduce browser reflows and when to promote an element to the GPU.

Differences between the browser layout, compositing and painting.

HTTP requests – GET and POST along with associated headers such as Cache-Control, ETag, Status Codes, and Transfer-Encoding.

Meta questions – About source control, UI, HTTP & the web in general etc. See if the candidate knows a bit more beyond their specific topic of interest.

REST vs RPC.

Security – when to use JSONP, CORs, and iFrame policies.

CSS Preprocessing

Testing/Debug

Building and Automation Tools

Common cross browser issues and how to resolve them

CSS and JS minifying

三、资料推荐

对于this弄不清楚的,可以读一读这个:

https://github.com/getify/You-Dont-Know-JS/blob/master/this%20&%20object%20prototypes/README.md#you-dont-know-js-this–object-prototypes

JS基础梳理:这位朋友写的非常棒,搜“JavaScript学习总结”:https://segmentfault.com/u/trigkit4/articles?page=5

四、笔记

这块是我自己的笔记,只记录了自己认为需要回看的东西

HTML

标签描述了基本的链接地址/链接目标,该标签作为HTML文档中所有的链接标签的默认链接

Block-Level, it takes whole line,

,

,