---Advertisement---

FRONTEND INTERVIEW QUESTIONS & ANSWERS (Level-2)

By Manisha

Published On:

---Advertisement---

🔹 React.js

Q14: What are controlled vs uncontrolled components?
A: Controlled components rely on React state to manage input values. Uncontrolled components use the DOM to manage their own state.

Q15: What are React Hooks?
A: Hooks are functions like useState, useEffect, etc., that let you use state and lifecycle methods in functional components.

Q16: What is the Context API in React?
A: Context API allows you to pass data deeply through the component tree without having to pass props manually at every level.


🔹 HTML

Q17: What is the viewport meta tag used for?
A: It controls the layout on mobile browsers. Example:

html

<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>

Q18: Difference between block and inline elements?
A: Block elements take the full width and start on a new line. Inline elements only take the width necessary and stay in line with other content.


🔹 CSS

Q19: What is Flexbox?
A: Flexbox is a CSS layout model that makes it easier to design flexible and responsive layout structures.

Q20: Difference between em, rem, and px?
A: px is fixed, em is relative to the parent, and rem is relative to the root element.


🔹 JavaScript

Q21: What is the difference between == and ===?
A: == checks for value equality with type coercion, while === checks for both value and type.

Q22: What is a Promise in JavaScript?
A: A Promise represents an asynchronous operation that may complete in the future, either resolved or rejected.

Q23: What is event bubbling and capturing?
A: Event bubbling starts from the innermost element and bubbles up, while capturing starts from the outermost element and goes inward.

👉The Next Questions-3: FRONTEND

---Advertisement---

Leave a Comment