How can I make it so that addEventListener() has two functions inside it?
I have tried finding my own solution, but none seem not to work. Please give me example if it is possible.
Wrap your functions in a function.
const invokeMe = () => console.log('I live here outside the scope');
const alsoInvokeMe = () => console.log('I also live outside the scope');
element.addEventListener('event',() => {
invokeMe();
alsoInvokeMe();
});