31. How many properties are available in a memory object? A. 1 B. 2 C. 3 D. 4 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: There are a total of 3 memory objects namely : 1. jsHeapSizeLimit 2. totalJsHeapSize 3. usedJsHeapSize
32. What is a heap in JavaScript? A. Collection of Java objects B. Collection of JavaScript objects C. Collection of memory usage values D. Collection of data stored in memory Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B Solution: The heap is the collection of JavaScript objects that the interpreter keeps in resident memory.
33. What is the function of the memory object? A. Gets unused memory details B. Shows optimization C. Gets memory usage D. None of the mentioned Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: The memory object is a feature of Chrome that allows us to see the memory usage that Chrome is taking up while running our page.
34. What is the command to access the Heap size limit? A. performance.memory. SizeLimit B. performance.memory. jsHeapSizeLimit C. jsHeapSizeLimit D. performance.jsHeapSizeLimit Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B Solution: The command performance.memory. jsHeapSizeLimit is used to access the Heap size limit.
35. What is the purpose of garbage collection? A. Removes object with many reference B. Removes object with reference C. Removes object with invalid reference D. Removes object with no reference Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D Solution: When the interpreter sees an object in the heap with no object references, it removes that object from the heap. This is called garbage collection.
36. What does the usedJsHeapSize property indicate? A. Amount of memory used B. Amount of memory unused C. Amount of memory used & unused D. None of the mentioned Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: The usedJsHeapSize property is the amount of memory that all of the current objects in the heap are using.
37. Which of the following property indicate the total size of heap? A. heapSize B. totalHeapSize C. totalJsHeapSize D. totalHeap Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: The totalJsHeapSize is size of the heap including free space not used by objects.
38. What can be done to monitor the memory usage? A. Profiling B. Sequencing C. Serializing D. None of the mentioned Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: Profiling allows us to monitor our memory usage.
39. Which of the following gives the high level breakdown of memory usage? A. about:memory B. memory C. about-memory D. about::memory Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: Typing about:memory into the location bar brings up a page that gives a high-level breakdown of memory usage.
40. Which keyword must be used to get a more granular insight of the memory usage? A. verb B. verbose C. granule D. none of the mentioned Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B Solution: To get a more granular insight of the memory usage, we must type about:memory?verbose.