JavaScript Interview Questions Collection-2

  1. What is ECMAScript in Javascript?
  2. what is the difference between var, let, and const?
  3. What are Spread Operator, Rest Operator, and default parameter?
  4. What are deep copy and shallow copy in Javascript?
  5. explain callback, promises, and async/await in Javascript?
  6. What is a higher-order function in Javascript?
  7. Explain different types of functions in Javascript?
  8. What is the arrow function in Javascript?
  9. Why do we use call, apply, and bind methods in Javascript?
  10. How many ways to create objects in Javascript?
  11. What is prototype inheritance in Javascript?
  12. What is typescript?
  13. What are the array method, and string method in Javascript?
  14. What is throttling and debouncing in JS?
  15. What is Null and undefined in Javascript?
  16. What is execution context, event loop, stack call queue, and microtask queue in Javascript?
  17. What is setTimeOut and setInterval in Javascript?
  18. What is the difference between set and map in Javascript?
  19. What is session storage, local storage, cookie?
  20. Write a program to sort an array?
  21. What is the use of json.stringify and json.parse() method in Javascript?
  22. explain map, filter, and reduce in Javascript?
  23. What is the generator function in Javascript?
  24. What is closure in Javascript?
  25. What is housing in Javascript?
  26. What is dead zone in Javascript?
  27. What is memorization in Javascript?
  28. What is function currying in Javascript?
  29. What is a mutation observer in Javascript?
  30. How to stop event propagation in Javascript?
  31. Write Hosting Example
  32. DIff: Normal vs Arrow function
  33. What is Event Capturing and event bubbling
  34. How to stop Event Capturing and event bubbling
  35. Spread and rest operator
  36. Debounce and Throttling
  37. How does TypeOf Operator work?
  38. List out the different ways an HTML element can be accessed in a JavaScript code
  39. What are the ways to define a variable in JavaScript?
  40. What is a prompt box?
  41. What is the ‘this’ keyword in JavaScript?
  42. setTimeout, setInterval, and clearInterval.
  43. What are the major advantages of JavaScript?
  44. What are the data types supported by JavaScript?
  45. JavaScript Functions – What do you know about it?
  46. What is the difference between JavaScript keywords – var and let.
  47. Array Destructuring vs Object Destructuring
  48. Difference between Arrow function and Regular Function
  49. Currying in JS
  50. What are the different Datatypes in JS?
  51. Difference between Null and Undefined
  52. Event Delegation in JS
  53. Event bubbling vs Event capturing
  54. Function declaration vs Function expression
  55. What is Memoization in JS?
  56. Difference between Primitive and Non-primitive datatype
  57. Prototypal Inheritance in JS
  58. What is a Pure function in JS?
  59. Scopes in JavaScript
  60. Difference between Shallow copy and Deep copy
  61. Significance of 'this' keyword
  62. What is Temporal Dead Zone in ES6?
  63. What are the different ways to clone an Object?
  64. What is IIFE( Immediately Invoked Function Expression)?
  65. What is the Callback function?
  66. What is the method to change the title of a page using JavaScript?

Ans. Generally, the page title varies based on the HTML document and the element structure. We can give id to an element and use code: