During the preparation for the interview, I didn’t see many data points on the frontend interview experiences at Company L. In mid-March, a recruiter contacted me about a frontend position and I scheduled a phone interview.
Phone interview on April 6:
Company L’s frontend interview process:
-
First 10 minutes: Assessing JavaScript and web fundamental knowledge
- Explain your understanding of JS events and how they work in JS.
- Why would you want to stop event bubbling behavior? How would you do it? (event.stopPropagation)
- Difference between event.stopPropagation and event.preventDefault?
- How would you build a responsive web page?
-
Next 10 minutes: Evaluating JavaScript code for correctness and live debugging. You can refer to this article: LinkedIn面试实录:一场感觉身体被掏空的前端面试 – TecHug — TecHug
-
Following 10 minutes: Coding question
Implement a memorization function that takes another function performing computation as a parameter. The memorization function should also accept a number; if the result exists, it should not recompute.
Usage of the memorize function:
const memoed = yourMemorizeFn(someFunction);
memoed(100) // compute and return the result as it doesn’t exist
memoed(1000) // compute and return the result as it doesn’t exist
memoed(100) // result exists, return without computation
memoed(1000) // result exists, return without computation
This question mainly tests familiarity with JS closures. It’s not difficult; define an object well and determine what to use for storing keys and values. Overall, the questions are not too advanced, and with sufficient preparation, it should be manageable.