JavaScript Memory Management & Garbage Collection Interview Questions – JavaScript Memory Management Online Quiz

Question 1:  In JavaScript, memory management primarily involves which two processes?

Question 2:  Which type of memory is automatically managed by JavaScript’s Garbage Collector?

Question 3:  What is the main purpose of Garbage Collection in JavaScript?

Question 4:  JavaScript uses which algorithm for garbage collection in most engines?

Question 5:  In JavaScript memory allocation, where are primitive values like numbers and strings stored?

Question 6:  Which of the following can lead to a memory leak in JavaScript?

Question 7:  What happens in the 'mark' phase of the Mark-and-Sweep algorithm?

Question 8:  How can you manually suggest the garbage collector to run in JavaScript?

Question 9:  Which of the following is NOT a cause of memory leaks in JavaScript?

Question 10:  Which tool can you use in Chrome DevTools to detect memory leaks?

Leave a Reply