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

JavaScript Interview Questions Cleaned

The document provides a list of JavaScript interview questions and answers, covering key concepts such as variable declarations (let, const, var), hoisting, closures, event bubbling and delegation, and the differences between == and ===. It also explains Promises, async/await, setTimeout vs setInterval, arrow functions, and the 'this' keyword. This resource is aimed at preparing candidates for full-stack web development interviews.

Uploaded by

Harsh Mishra
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)
30 views2 pages

JavaScript Interview Questions Cleaned

The document provides a list of JavaScript interview questions and answers, covering key concepts such as variable declarations (let, const, var), hoisting, closures, event bubbling and delegation, and the differences between == and ===. It also explains Promises, async/await, setTimeout vs setInterval, arrow functions, and the 'this' keyword. This resource is aimed at preparing candidates for full-stack web development interviews.

Uploaded by

Harsh Mishra
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

Full-Stack Web Development Interview Questions

JavaScript Interview Questions

1. Difference between let, const, and var

- var: Function-scoped, hoisted (initialized as undefined), reassignable.

- let: Block-scoped, hoisted (not initialized), reassignable.

- const: Block-scoped, hoisted (not initialized), not reassignable.

2. What is Hoisting in JavaScript?

- JS moves declarations to the top before execution. var gets undefined, let/const give error if accessed

before declaration.

3. Explain Closures with an Example

- A closure is a function that remembers variables from its parent scope even after the parent has finished

executing.

4. What is Event Bubbling and Delegation?

- Bubbling: Event flows from target up to ancestors.

- Delegation: One handler on parent can manage all childrens events.

5. Difference between == and ===

- == compares value (with coercion), === compares value and type.

6. What are Promises in JavaScript?

- Promises represent async results with 3 states: pending, resolved, rejected.

7. Explain async/await with an Example

- Used to write async code that looks synchronous, works with Promises.

8. Difference between setTimeout and setInterval

- setTimeout runs once after delay, setInterval runs repeatedly.


Full-Stack Web Development Interview Questions

9. What are Arrow Functions? How are they different?

- Short syntax, dont have their own this, arguments, or super.

10. Explain this Keyword in JavaScript

- this refers to different objects depending on context: global (window), object method (object), arrow function

(lexical).

You might also like