“Uncaught TypeError: Cannot read property ‘addEventListener’ of null” appears in the console

try this : const arrowBtn = document.querySelector('.arrow-div');
if you defined and d you would do arrow-div const arrowBtn = document.querySelector('#arrow-div');
the syntaxt u used is for html elements like img const arrowBtn = document.querySelector('img');

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top