Hacker News new | ask | show | jobs
by kushan2020 3059 days ago
If you careful read the code ``` function sayHi() { var allNames = []; return name => { allNames.push(name); return ' ' + name; } } ``` It leaks memory on every invocation of the returned function