Function identity in JavaScript, or how to remove event listeners properly

added by JavaScript Kicks
6/11/2018 7:20:35 AM


Last week I looked over some JavaScript a colleague of mine had written, and I noticed an interesting mistake. Interesting because I knew that I had myself tripped over this at some point, and seeing it in someone else's code showed me that it's indeed a tricky problem more people are struggling with, so I thought it might be worth sharing.