Basics
- What are the differences between
var
,let
, andconst
? - Explain the difference between
==
and===
in JavaScript. - What is hoisting in JavaScript?
- Explain closures and give an example.
- What is the difference between function declaration and function expression?
- What is the difference between
null
andundefined
? - What are template literals, and how do you use them?
- Explain the difference between synchronous and asynchronous code.
- What are arrow functions, and how do they differ from regular functions?
- What is the difference between primitive and reference types in JavaScript?
Advanced Topics
- What is the event loop in JavaScript?
- Explain the concept of Promises in JavaScript.
- What are async/await, and how do they work?
- Explain callback functions with an example.
- What is the difference between shallow and deep copy in JavaScript?
- Explain the concept of
this
in JavaScript. - What are JavaScript Prototypes, and how do they work?
- Explain the difference between
call()
,apply()
, andbind()
. - What is debouncing and throttling? Provide examples.
- What is the difference between
map()
,forEach()
,filter()
, andreduce()
?
DOM & BOM
- How do you select elements using JavaScript (e.g.,
querySelector
vs.getElementById
)? - What is event delegation, and why is it useful?
- How does event bubbling and capturing work in JavaScript?
- Explain localStorage, sessionStorage, and cookies.
- How do you prevent the default behavior of an event in JavaScript?
ES6+ Features & Best Practices
- What are JavaScript modules, and how do you use
import
andexport
? - What is destructuring in JavaScript, and how is it used?
- What are rest and spread operators in JavaScript?
- What is optional chaining (
?.
) in JavaScript? - Explain the difference between deep equality and shallow equality in JavaScript.
Top comments (0)