All advance and most asked interview question in javascript

Table of contents

No heading

No headings in the article.

  1. What is JavaScript and how does it differ from Java?

  2. how javascript is executed ? (or) what is execution context ? how many phase it has ?

  3. Explain the concept of hoisting in JavaScript. (or) What is the difference between "let", "const", and "var" in JavaScript? (or) what is temporal dead zone?

  4. What is a closure in JavaScript? Provide an example. (or) What are closures? How do they work? Provide an example. (or) What are scope chaining?

  5. why javascript is called a First Class Function (or) First Class Citizens?

  6. difference between

    1. async and differ? when to use what?

    2. local storage, cookies and session? when to use what?

    3. authentication and authorization? How do you handle it?

    4. Function statement (or) Function Declaration, Function expression, Anonymous Function, Named Function Expression?

    5. function currying , function constructor , IIFE , pure function , function compose

    6. Local vs global scope , Scope, lexical scope

    7. Event loop , call stack , web api, (callback queue, micro task queue → which has highest priority)

    8. "let", "const", and "var"

    9. callback , promise and async-await? which is better? when to use what?

    10. "undefined","null" and not defined

    11. call by value and call by reference

    12. Event bubbling , Event capturing / trickling and Event delegation

    13. debouncing and throttling? when to use what? write code of both?

    14. synchronous and asynchronous programming

    15. "==" and "===" operators

    16. "nullish coalescing" and "optional chaining" operators

    17. shallow and deep copy? (or) how do you copy/clone array and object in js?

    18. normal function and arrow function?

    19. "for in" and "for of"

    20. setTimeout and setInterval

    21. map, filter and reduce? (or) higher order function? write polyfill of each?

    22. map vs foreach

    23. JSON.stringify() and JSON.parse()

    24. spread and rest operator

    25. call, apply and bind? when to use what? write polyfill of each?

    26. parameter and argument

    27. prototype vs prototypal inheritance

    28. function, generator functions and iterators

    29. slice vs splice

    30. fetch vs axios vs xml

    31. Obj.seal vs obj.freeze

    32. promise.all(), promise.allselected(), promise.race() and promise.any()

    33. Map and weak map

    34. set and weak set

    35. es5 and es6

  7. tricky question

    1. const points = [40, 100, 1, 5, 25, 10];

      points.sort(); -> o/p : 1,10,100,25,40,5, why?

    2. typeof []

  8. what is Event Flow in js? (or) what is Event bubbling, capturing? (or) all phases of event in js?

  9. How do you handle asynchronous operations in JavaScript? Explain the concept of callbacks.

  10. What is the "this" keyword in JavaScript? How does it work?

  11. Explain the concept of memoization in JavaScript.

  12. How do you handle CORS (Cross-Origin Resource Sharing) in JavaScript?

  13. Describe the concept of currying in JavaScript.

  14. What are modules in JavaScript? How do you import and export modules?

  15. Explain the concept of functional programming in JavaScript.

  16. How do you handle date and time manipulation in JavaScript?

  17. How do you handle error handling in JavaScript? Explain the try-catch statement.

  18. What are the different ways to loop through an array in JavaScript?

  19. What are the different ways to handle JSON data in JavaScript?

  20. How do you handle memory management in JavaScript?

  21. What are the different methods for string manipulation in JavaScript?

  22. Describe the concept of function composition in JavaScript.

  23. Explain the concept of the "arguments" object in JavaScript.

  24. What are the different ways to handle concurrency in JavaScript?

  25. How do you handle cross-site request forgery (CSRF) attacks in JavaScript?

  26. How do you handle memory profiling in JavaScript?

  27. Explain the concept of the module pattern in JavaScript.

  28. What are the different ways to handle form validation in JavaScript?

  29. How do you handle data manipulation in JavaScript?

  30. Explain the concept of asynchronous generators in JavaScript.

refer:

akshay-saini : youtube , namaste-js-season1 , namaste-js-season2 , notes

roadside-coder : youtube , hashnode

coder-dost : youtube , notes

code-step-by-step : playlist

uncommon-geeks : playlist