Javascript – JS GC in closure
hi i have a query and was unable to get exact answer. I have a below closure function function closure() {let innerVal; return function() {innerVal = innerVal+10}} let inst = closure(); inst(); console.log('end'); will innerVal be cleared during GC after…