Garbage collection is the process in which many high-level languages (like JavaScript) clear the memory from unused objects. It is based on the fact that JavaScript has some reference tree from some global