0% found this document useful (0 votes)
15 views2 pages

Complete Interview Questions Answers

The document provides a series of interview questions and answers across various topics including JavaScript, React, CSS, and Backend/API. Key concepts discussed include the differences between `var`, `let`, and `const`, the nature of closures, React Hooks, the virtual DOM, the CSS box model, Flexbox, REST architecture, and API authentication methods. Each section offers concise explanations and examples to clarify the topics.

Uploaded by

Guneet Thind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Complete Interview Questions Answers

The document provides a series of interview questions and answers across various topics including JavaScript, React, CSS, and Backend/API. Key concepts discussed include the differences between `var`, `let`, and `const`, the nature of closures, React Hooks, the virtual DOM, the CSS box model, Flexbox, REST architecture, and API authentication methods. Each section offers concise explanations and examples to clarify the topics.

Uploaded by

Guneet Thind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Interview Questions and Answers

JavaScript Questions and Answers

1. What is the difference between `var`, `let`, and `const`?

`var` is function-scoped and hoisted, `let` is block-scoped and not hoisted, and `const` is

block-scoped and its value cannot be reassigned.

2. Explain closures in JavaScript with an example.

A closure is a function that retains access to its lexical scope even when the function is executed

outside that scope. Example: function outer() { let count = 0; return function inner() { count++; return

count; } }.

React Questions and Answers

1. What are React Hooks?

Hooks let you use state and other React features in functional components. Examples include

`useState`, `useEffect`.

2. What is the virtual DOM?

The virtual DOM is a lightweight representation of the actual DOM. React uses it to optimize

updates by comparing the virtual DOM with the actual DOM.

CSS Questions and Answers

1. What is the box model in CSS?

The box model includes `margin`, `border`, `padding`, and `content`, defining how elements are

spaced and displayed.

2. How does Flexbox work?

Flexbox is a layout model for 1-dimensional layouts. Key properties include `justify-content`,
`align-items`, and `flex-wrap`.

Backend & API Questions and Answers

1. What is REST?

REST is an architectural style that uses standard HTTP methods like GET, POST, PUT, DELETE

for API interactions.

2. What is the purpose of API authentication?

API authentication ensures secure access to resources using methods like JWT, OAuth, and API

keys.

You might also like