Domanda di colloquio di SmartNews

What causes memory leak in JavaScript and how to deal with them? How would you locate memory leaks in your code?