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
Wrap your functions in a function. But need to send all params from addEventListener callback (paramter event)
const callbackOne = (...props) => {
console.log('callbackOne', ...props)
};
const callbackTwo = (...props) => {
console.log('callbackTwo', ...props)
};
element.addEventListener('eventName',(...props) => {
callbackOne(...props);
callbackTwo(...props);
});
You