JavaScript Questions 11 total
JavaScript ×
0
0
answers
1What is the salary of a full stack developer in India 2025?
Full stack developer salaries in India (2025):
**By experience:**
- Fresher (0-1 year): ₹3.5 – ₹7 LPA
- Junior (1-3 years): ₹7 – ...
0
0
answers
2What is MongoDB aggregation pipeline?
The aggregation pipeline processes documents through a sequence of stages, similar to SQL's GROUP BY + JOINs.
**Common stages:**
- `` — f...
0
0
answers
3How do you handle authentication in a MERN stack app?
The standard approach uses JWT (JSON Web Tokens):
**Flow:**
1. User logs in → sends email + password to Express
2. Express validates cred...
0
0
answers
4What is the difference between useCallback and useMemo in React?
Both are React hooks for performance optimisation — they prevent unnecessary recalculations:
**useMemo — memoises a VALUE:**
```jsx
con...
0
0
answers
5What is the MERN stack and how does it work together?
MERN is a full-stack JavaScript framework combining 4 technologies:
**M — MongoDB:** NoSQL database (stores data as JSON documents)
**E �...
0
0
answers
6What is the difference between useState and useEffect in React?
**useState** — manages state (data that can change over time)
**useEffect** — handles side effects (API calls, subscriptions, timers)
`...
0
0
answers
7What is async/await in JavaScript?
**async/await** is syntactic sugar over Promises that makes asynchronous code look synchronous.
```javascript
// With Promises
fetch('/api/...
0
0
answers
8What is the difference between var, let, and const in JavaScript?
All three declare variables, but with different scope and mutability:
**var:** function-scoped, hoisted, can be redeclared
**let:** block-s...
0
0
answers
9What is Node.js and why is it used?
Node.js is a JavaScript runtime built on Chrome's V8 engine that lets you run JavaScript on the server side.
**Why use it:**
- **Non-blocki...
0
0
answers
10What is REST API and how does it work?
REST (Representational State Transfer) is an architectural style for building APIs.
Key principles:
- **Stateless** — each request is ind...
0
0
answers
11What is the difference between React and Angular?
| Feature | React | Angular |
|---|---|---|
| Type | Library | Full framework |
| Language | JavaScript | TypeScript |
| Learning curve | Mo...