Corrected function call

The function created isn't the function that was called. I corrected the function call
This commit is contained in:
Isah Abba Ibrahim
2021-07-29 22:46:36 +01:00
committed by GitHub
parent c93a5b9215
commit 86d5f9b3fa

View File

@ -18,7 +18,7 @@ const addEventListenerAll = (targets, type, listener, options, useCapture) => {
```
```js
addAllEventListeners(document.querySelectorAll('a'), 'click', () =>
addEventListenerAll(document.querySelectorAll('a'), 'click', () =>
console.log('Clicked a link')
);
// Logs 'Clicked a link' whenever any anchor element is clicked