41. What is the filter() function, and how does it work?
42. How do you use the reduce() function in JavaScript?
43. What is the purpose of the forEach() method in arrays?
44. Explain the difference between synchronous and asynchronous JavaScript.
45. What is a promise in JavaScript?
46. How do you create a promise in JavaScript?
47. What is the purpose of the async and await keywords?
48. Explain the concept of the event loop in JavaScript.
49. What are events in JavaScript, and how do you handle them?
50. How do you add an event listener to an element in JavaScript?
51. What is the Document Object Model (DOM) in JavaScript?
52. How do you select elements from the DOM using JavaScript?
53. What is the purpose of the getElementById() method?
54. How can you change the content of an HTML element using JavaScript?
55. What is the purpose of the innerHTML property?
56. How do you create a new HTML element using JavaScript?
57. What is the appendChild() method in JavaScript?
58. How do you remove an element from the DOM?
59. What is event propagation in JavaScript?
60. Explain the difference between event bubbling and event capturing.
61. What is the purpose of the preventDefault() method?
62. How do you stop event propagation in JavaScript?
63. What is a JavaScript framework?
64. Explain the purpose of libraries in JavaScript.
65. What is the role of npm in JavaScript development?
66. How do you create a simple JavaScript project using npm?
67. What is a module in JavaScript?
68. How do you import and export modules in JavaScript?
69. What is the purpose of the require() function?
70. What is ES6, and what are its key features?
71. Explain the concept of template strings in ES6.
72. What is the spread operator in JavaScript?
73. How do you use the rest operator in function parameters?
74. What is the purpose of the setTimeout() function?
75. How do you use setInterval() in JavaScript?
76. What are the differences between setTimeout() and setInterval()?
77. Explain how to create a simple countdown timer using JavaScript.
78. What is localStorage, and how do you use it?
79. How do you store and retrieve data from sessionStorage?
80. What is the difference between localStorage and sessionStorage?