Today, I had an exciting experience attending a frontend developer interview at Redislove, located in Nandanam. The first round was a written test, which consisted of 20 questions covering core frontend concepts. I wanted to share the questions and a brief overview of the topics, which might help others preparing for similar roles.
Interview Questions – Round 1 (Written Test)
1.How to optimize a webpage for performance?
Use lazy loading, compress images, minimize CSS/JS, use CDN, cache assets, and avoid render-blocking resources.
2.How is CORS handled in JavaScript?
CORS (Cross-Origin Resource Sharing) allows restricted resources on a web page to be requested from another domain. It’s handled using HTTP headers or by setting up a proxy or modifying server-side configurations.
3.What is a closure and how does it work?
A closure is a function that remembers its outer variables even after the outer function has finished executing.
4.Explain about positions: relative, absolute, and fixed in CSS.
relative: positions the element relative to its normal position.
absolute: positions the element relative to the nearest positioned ancestor.
fixed: positions the element relative to the viewport, staying fixed during scroll.
5.What is a media query and how does it work?
Media queries apply different CSS styles based on screen size, orientation, or resolution.
6.What is SPA (Single Page Application)?
A web application that loads a single HTML page and dynamically updates content without refreshing the entire page.
7.Client-side vs Server-side rendering
Client-side rendering: content is rendered in the browser using JavaScript.
Server-side rendering: content is rendered on the server and sent as a fully formed HTML.
8.Explain about npm and yarn
Both are package managers. npm comes with Node.js, while yarn was created by Facebook for faster and more reliable installs.
9.How do you manage versioning and collaboration using Git?
Using Git branches, commits, pull requests, rebasing, and merge strategies. Platforms like GitHub or GitLab help in collaboration.
10.Build tools like Webpack or Vite are used for?
They bundle and optimize frontend assets for development and production, improving performance and modularity.
11.Difference between development and production environments
Development: with debug tools, source maps, and no minification.
Production: optimized, minified code with performance enhancements.
12. How do you debug a frontend application?
Using browser dev tools, console logs, breakpoints, network tabs, and tools like React DevTools.
13.Difference between id and class in HTML
id: unique and used for one element.
class: can be reused for multiple elements.
14.How to use the CSS Box Model?
Understand how margin, border, padding, and content affect layout and spacing.
15.Difference between arrow function and traditional function
Arrow functions do not have their own this, arguments, or new.
Traditional functions are more flexible in usage.
16. Explain em, rem, and px in CSS
px: fixed size
em: relative to parent
rem: relative to root (html) element
17. What are template literals and why are they used?
Template literals allow embedded expressions and multi-line strings using backticks ``.
18.Explain var, let, and const in JavaScript
var: function-scoped
let: block-scoped, reassignable
const: block-scoped, not reassignable
19.Synchronous vs Asynchronous JavaScript
Synchronous: code runs in sequence.
Asynchronous: code can run in the background (e.g., with setTimeout, fetch).
20.How does the event loop work in JavaScript?
The event loop manages the call stack and task queue to handle asynchronous callbacks without blocking the main thread.
💭 Final Thoughts
This interview was a great refresher on core frontend concepts. Whether you're a beginner or experienced developer, it's crucial to understand the fundamentals clearly. Preparing well and practicing problem-solving is key.
If you're preparing for frontend roles, I hope this list helps. I’m planning to write more about how I answered these questions in detail — stay tuned!
Top comments (0)