JavaScript Questions - AdarshTheki/mern-stack-learn GitHub Wiki

Basic Javascript

  1. What is JavaScript?
  2. Explain the difference between let, const, and var.
  3. How does hoisting work in JavaScript?
  4. Describe the concept of closures.
  5. Explain the event loop in JavaScript.
  6. What is the difference between == and ===?
  7. How do you check the type of a variable in JavaScript?
  8. What is the use of the this keyword in JavaScript?
  9. Explain the difference between function declaration and function expression.
  10. How does the setTimeout function work?

Function & Scope

  1. What is a callback function?
  2. Explain the concept of a pure function.
  3. Describe the differences between function.call, function.apply, and function.bind.
  4. What is the purpose of the arguments object in a function?
  5. How do you create a closure in JavaScript?
  6. What is the use of the bind method?
  7. What is the difference between a shallow copy and a deep copy?
  8. How does the call stack work in JavaScript?
  9. Explain the concept of function currying.
  10. How can you avoid callback hell in JavaScript?

Object & Prototype

  1. What is prototypal inheritance?
  2. How do you create an object in JavaScript?
  3. What is the purpose of the prototype property in JavaScript?
  4. Explain the difference between Object.create and the constructor pattern.
  5. How do you add a property to an object in JavaScript?
  6. What is the hasOwnProperty method used for?
  7. How can you prevent modification of object properties in JavaScript?
  8. Describe the use of the new keyword.
  9. Explain the concept of Object Destructuring in JavaScript.
  10. What is the difference between null and undefined?

DOM manipulation & Events

  1. What is the DOM?
  2. How do you select elements with Vanilla JavaScript?
  3. Explain event delegation in JavaScript.
  4. What is the purpose of the addEventListener method?
  5. How do you create and remove elements in the DOM?
  6. Explain the concept of event propagation.
  7. How can you prevent the default behaviour of an event?
  8. What is the purpose of the data- attribute in HTML?
  9. Describe the difference between innerHTML and textContent.
  10. How do you handle asynchronous code in JavaScript?

Top Question Interviews? What is it, How does it works and Why?

  1. Set Time Out Zero ? Event Loop ? Promise.resolve() ?
  2. Critical Rendering Path (CRP) ? Head, body, End, Delay load, Defer, Async ?
  3. Let, Const and Var difference ? In block scoping understand ? what is TDZ ?
  4. Closure explain with example ?
  5. Functional Programming ? Pure function ? create Polyfill map filter, reduce ? compose, curring usage ?
  6. This keyword ? call bind apply ? arrow function ?
  7. Frameworks chosen and why ?
  8. Virtual DOM , Reconciliations ? Prototypical Inheritances ?
  9. Callback, Async/Await, Promise etc ? Parallel Request ? Sub-sequences Request ? why Your own Promise implantation, state manage ?
  10. Debounce vs Throttle ?