DEV Community

loading...

Comment from a deleted article or podcast

You can check out this article to better understand how memory leak can happen when using closures. In filter, map or reduce we provide a callback function as an argument. We don't return a function from a function there.