Front-end-interview
Opening
- Please introduce yourself from a technical perspective — walk me through what you've worked on over the past few years. Keep it within five minutes.
Warm-up
- Interviewer self-introduction: role overview, responsibilities, and what we're looking for in this position
- Ask the candidate to highlight relevant experience based on what was just described
- What was your role at your last job? Can you walk me through a project you're most proud of?
- What are your expectations? What's the one thing you most want to learn this year?
- Have you been following any new technologies lately? Any takeaways? Have you tried them out? Any open-source work to share?
- Do you enjoy writing code? What aspect of coding do you find most interesting?
- Whiteboard: write a string reversal function
- What did you learn from your previous job?
- Have you been reading any programming-related books recently?
What to observe
- Attitude
- Genuine interest in front-end development
- Willingness to learn new things
- Culture and communication fit with the team
- Whether foundational skills are solid enough
Technical Questions (target: 2+ years of experience)
Session / Cookie
- After a user logs in on one page, how does the next page know they're authenticated?
- Where do you typically store frequently used user data?
Performance
- Have you implemented caching before? When should caching be used?
- How do you optimize a website's static assets? How do you bundle them — into how many files, and how do you decide? How do you debug after bundling?
- If a static file is cached and a new version is released, how do you force an update? Version numbers in filenames? Any other approaches?
- Have you used a CDN before?
- Walk me through a few techniques you've used to speed up page load times.
- An article-listing website needs to frequently query 50+ posts for the homepage — how would you handle that?
- Have you ever dealt with complaints about slow page loading? What was the situation and how did you resolve it? Where do you look first?
- You have around 500 records to display paginated on a web page — how would you approach it? What about 50,000 records?
- When do you populate an in-memory cache? If it sacrifices startup time and slows down development, how do you handle that?
- When there are multiple application servers, how do you handle caching? If the cache lives in a database, who is responsible for updating it?
- Have you ever encountered slow database queries in production? How would you investigate? How do you determine whether the bottleneck is network, query, or something else?
SEO
- How does fetching data via Ajax affect SEO?
- What are the key factors in SEO? What optimizations have you implemented? What tools have you used?
Meta tags, keywords, title, responsive design, content quality, server-side rendering, routing, URL rewrite, canonical URL, user experience, robots.txt - When a site is under maintenance, crawlers may still visit — how do you handle that?
Testing
- What languages/frameworks have you written tests in?
- If the function you're testing calls
updateDB, how do you handle that in your test? - What is TDD? Does it make a practical difference compared to writing tests after the code?
- Have you used any design patterns specifically to support TDD?
- What about BDD?
- What end-to-end testing tools have you used?
Data Analysis
- What is the purpose of using GA? Have you collected custom events with GA? How?
- Have you used the ELK Stack?
Design
- If you needed to log the input and output of every request, how would you implement that?
- When would you use an interface?
DevOps
- What is DevOps?
- Have you used any CI/CD tools? What are the benefits?
- Have you used cloud services? What are the advantages?
Debugging
- If a user's order data disappeared on the frontend, where would you start looking?
- How would you query logs across 10 servers?
Advanced
- Three clients — a website, a mobile browser, and a mobile app — all consume the same API. The mobile app gets a new version that requires a different data format for one field. How do you handle this without breaking the others?
- Have you built a real-time application? If a backend service needs to push a message to a specific user, Andy, how would you route it? How do you know which connection ID maps to Andy? If the mapping is stored per-server and there are multiple servers, how do you resolve the mapping?
Coding
JavaScript
- What is the difference between placing
<script>in the<head>vs. at the end of<body>? What about<link rel="stylesheet">? - What is the difference between
<script async>and<script defer>? - Implement:
duplicate([1,2,3,4,5])→ result:[1,2,3,4,5,1,2,3,4,5] ==vs.===- How do you make a cross-origin AJAX request from client A to domain B?
- Explain closures
- Front-end frameworks: React — state vs. props; Angular — directives
- Node.js / Express: how does Express handle errors, requests, responses, and
next? - Deferred / Promise: what are
resolveandreject? Where have you used Promises? - Explain JavaScript hoisting
- Primitive types vs. reference types
- List the differences between regular functions and arrow functions
- Walk me through what happens when you type "google.com" into the browser address bar and press Enter
- Why is
setIntervalnot precise with timing? - What is the difference between
varandlet?
CSS
- ID selectors vs. class selectors
- How do you debug CSS issues?
- Which CSS frameworks have you used?
- How does responsive web design (RWD) work?
- CSS sprites
- Icon fonts
- List and describe the CSS
displayproperty values you know
Vue
- What is your understanding of single-page applications (SPA)? What are their advantages and disadvantages?
- What is the difference between
v-showandv-if? - How do you dynamically bind
classandstyle? - What is the difference between
computedandwatch? When would you use each? - How do you understand the Vue component lifecycle?
- What are the different ways components can communicate in Vue?
- How do you implement inheritance in Vue?
- What is the difference between
Vue.extendand mixins? - If a Vue observed object is mutated but the view doesn't update, what would you do?
Reference
https://github.com/h5bp/Front-end-Developer-Interview-Questions https://github.com/Asing1001/front-end-interview https://juejin.cn/post/6844903918753808398





























Comments