May 29, 2021 Article blog
Over the past few years, I've interviewed a lot of web developers and software engineers at Amazon and Yahoo focused on front-end development, and in this article, I'd like to share some interview tips to help candidates prepare for the interview.
Disclaimer - This article is not intended to list all the questions that might be asked in a front-end interview, but it can be considered a baseline of knowledge.
Interviewing is not easy, and as a candidate, you often need to show what you can do in 45 minutes. A s an interviewer, it is also difficult to assess the suitability of a candidate in such a short period of time. There is no one-size-fits-all approach to an interview, and the interviewer usually asks a range of questions, but beyond that, they can decide for themselves what other questions to ask.
As a former candidate and interviewer, I'm trying to cover in this article the most important front-end development knowledge you might be asked about in an interview.
One of the biggest mistakes I've ever seen a candidate make is
==
to prepare trivial questions, such as "What is a box model" or "What's the difference
===
a JavaScript.
It's good to know the answers to these questions, but it doesn't tell the interviewer much useful information.
Instead, in a real interview, you might want to write code using JavaScript, CSS, and HTML. D uring your interview, you may need to implement a UI, build widgets, or write common utility functions using libraries like Lodash and Underscore .js. For example:
debounce
or depth
clone
object.
Speaking of libraries, another mistake I see candidates often make is that they need to rely entirely on the latest framework to solve interview questions. Y ou might think, if I could use jQuery, React, Angular, and so on in a production environment, why wouldn't I use them in an interview? T echnology, frameworks, and libraries change over time - I'm more interested in whether you understand the underlying principles of front-end development than relying on higher levels of abstraction. If you can't answer interview questions without them, I hope you can at least fully explain and speculate on the principles behind these libraries.
In general, most interviews involve actual coding.
You need to know JavaScript, and you need to know it thoroughly. T he higher the position you are interviewing for, the higher the requirements for language knowledge. Here are the JavaScript knowledge points you should be familiar with:
call
bind
apply
and
this
mixin
typeof
instanceof
and
Object.prototype.toString
promise
await
and
async
to handle asynchronous calls;
It's important to know how to traverse and manipulate doMs, and candidates who rely heavily on jQuery or develop a lot of React-Angular-type applications may struggle with this issue. Y ou may not come into direct contact with DOM every day because most of us use various abstractions. Without using third-party libraries, you need to know how to do the following:
document.querySelector
to select or find nodes and use
document.getElementsByTagName
in legacy browsers;
Node.parentNode
Node.firstChild
Node.lastChild
and
Node.childNodes
Node.previousSibling
and
Node.nextSibling
At the very least, you should know how to lay out elements on a page, how to use child elements or direct descendant selectors to locate elements, and when to use classes and when to use IDs.
Know which HTML tags best represent what you're displaying and related properties, and you should have manual knowledge.
disabled
async
defer
and when to use
data-*
doctype
(most people don't write new pages every day, so they might forget this) and what meta tags can be used;
for
There's also
role="button"
role="presentation"
and so on.
In system design, knowledge such as MapReduce, distributed key-value storage systems, or CAP theorems is often involved. W hile front-end engineers don't need to have a deep day-to-day understanding of how to design such systems, you shouldn't be surprised to be asked to design front-end architectures for common applications. T hese questions are often vague, such as "Design a website like Pinterest" or "How do I build a shopping checkout service?" ” 。 Here are some things to consider:
In addition to common programming best practices, you should expect visitors to review your code or design and its performance impact. It used to be enough to put CSS at the top of the document, and JS scripts at the bottom of the page, but the web is moving fast, and you should be familiar with the complexity of this area.
This may be a bit controversial, but having a basic understanding of Big-O time complexity and common runtimes such as O(N) and O (N Log N)) won't be a bad thing for you. S ingle-page applications are now very common, so it's helpful to know something about memory management and more. For example, if you are asked to build a client spell checker, understanding common data structures and algorithms will make your task much easier.
I'm not saying you'll need to take a computer degree, but the industry has moved from building simple web pages to computer science. There are many resources on the Internet that can give you a quick grasp of the basics.
You need to master some of the technologies and paradigms that make up the Web.
For a Web developer or engineer, building a Web application requires a lot of knowledge. Don't be limited by the depth of knowledge, but keep an open mind to learn all the complex parts.
In addition to the technical topics covered here, you'll need to discuss past projects, describe what interesting things have happened, and what trade-offs have been made.
The source of the article |
Top of the front end
To learn more about programming, go to
the W3Cschool website
and learn programming anytime, anywhere.