i have question in my head. if i run the following code.
function test() { console.log('test'); }
event.addEventListner('click', test);
event.addEventListner('click', test);
event.addEventListner('click', test);
i guess the event callback will be overlay each other and result console.log('test') once, but what happened to those extra event listeners? do they get garbage collected and removed from memory?
will it lead to memory leak if mutiple event been assigned with same function?
many thanks