Frontend Interview Preparation Notes
1. JavaScript (ES6+)
Core JavaScript Fundamentals:
- Variables: var (function-scoped), let & const (block-scoped)
- Data Types: Primitive (string, number, etc.) & Non-primitive (object, array)
- Operators: Arithmetic, Comparison, Logical
- Control Structures: if, else, switch, for, while, do...while, for...of, for...in
- Functions: Declaration, Expression, Arrow, Callback, Higher-Order, Closures
- Error Handling: try...catch, throw
- Objects & Arrays: Destructuring, Spread, Rest, Object methods
- Array Methods: map, filter, reduce, find, some, every, sort, concat, slice, splice
- ES6+ Features: Template Literals, Default Parameters, Modules, Promises & Async/Await
2. React
Functional Components:
- Build UI using functions; manage state using hooks
JSX:
- HTML-like syntax in JS, supports dynamic content
Hooks:
- useState, useEffect, useContext, useReducer, useMemo, useCallback
Frontend Interview Preparation Notes
Component Lifecycle (with Hooks):
- Mount: useEffect(() => {}, [])
- Update: useEffect(() => {}, [dep])
- Unmount: return () => {} inside useEffect
React Router:
- Navigation: BrowserRouter, Routes, Route, Link, useNavigate, useParams
3. State Management
React State:
- useState for local state; avoid prop-drilling
Redux:
- Centralized store; use actions, reducers, middleware (Thunk/Saga)
- Redux DevTools for debugging
Context API:
- Lightweight global state sharing using useContext
Other Libraries:
- MobX, Zustand, Recoil: alternatives for global state
Frontend Interview Preparation Notes
4. HTML/CSS
HTML5:
- Semantic tags: header, footer, main, section
- Forms: input, label, name, value, accessibility
CSS3:
- Flexbox, Grid, Media Queries, Animations, Pseudo-classes
Preprocessors:
- SASS/SCSS: Nesting, Variables, Mixins
CSS-in-JS:
- styled-components, Emotion
Responsive Design:
- Mobile-first design, Bootstrap, MUI, Tailwind
5. Git (Version Control)
Basic Commands:
- git init, clone, status, add, commit, push
Branching:
Frontend Interview Preparation Notes
- git branch, checkout, merge, pull
Conflict Resolution:
- Manual merge, then commit
Platforms:
- GitHub, GitLab, Bitbucket
6. API Integration
RESTful APIs:
- Methods: GET, POST, PUT, DELETE
Libraries:
- Axios: axios.get('/api').then().catch()
- Fetch: fetch('/api').then(res => res.json())
JSON Handling:
- Use .json(), try...catch for error handling