JavaScript Questions - AdarshTheki/mern-stack-learn GitHub Wiki
Basic Javascript
- What is JavaScript?
- Explain the difference between let, const, and var.
- How does hoisting work in JavaScript?
- Describe the concept of closures.
- Explain the event loop in JavaScript.
- What is the difference between == and ===?
- How do you check the type of a variable in JavaScript?
- What is the use of the this keyword in JavaScript?
- Explain the difference between function declaration and function expression.
- How does the setTimeout function work?
Function & Scope
- What is a callback function?
- Explain the concept of a pure function.
- Describe the differences between
function.call
, function.apply
, and function.bind
.
- What is the purpose of the arguments object in a function?
- How do you create a closure in JavaScript?
- What is the use of the bind method?
- What is the difference between a shallow copy and a deep copy?
- How does the call stack work in JavaScript?
- Explain the concept of function currying.
- How can you avoid callback hell in JavaScript?
Object & Prototype
- What is prototypal inheritance?
- How do you create an object in JavaScript?
- What is the purpose of the prototype property in JavaScript?
- Explain the difference between Object.create and the constructor pattern.
- How do you add a property to an object in JavaScript?
- What is the hasOwnProperty method used for?
- How can you prevent modification of object properties in JavaScript?
- Describe the use of the new keyword.
- Explain the concept of Object Destructuring in JavaScript.
- What is the difference between null and undefined?
DOM manipulation & Events
- What is the DOM?
- How do you select elements with Vanilla JavaScript?
- Explain event delegation in JavaScript.
- What is the purpose of the addEventListener method?
- How do you create and remove elements in the DOM?
- Explain the concept of event propagation.
- How can you prevent the default behaviour of an event?
- What is the purpose of the data- attribute in HTML?
- Describe the difference between innerHTML and textContent.
- How do you handle asynchronous code in JavaScript?
Top Question Interviews? What is it, How does it works and Why?
- Set Time Out Zero ? Event Loop ? Promise.resolve() ?
- Critical Rendering Path (CRP) ? Head, body, End, Delay load, Defer, Async ?
- Let, Const and Var difference ? In block scoping understand ? what is TDZ ?
- Closure explain with example ?
- Functional Programming ? Pure function ? create Polyfill map filter, reduce ? compose, curring usage ?
- This keyword ? call bind apply ? arrow function ?
- Frameworks chosen and why ?
- Virtual DOM , Reconciliations ? Prototypical Inheritances ?
- Callback, Async/Await, Promise etc ? Parallel Request ? Sub-sequences Request ? why Your own Promise implantation, state manage ?
- Debounce vs Throttle ?