TypeError: Cannot read property 'addEventListener' of undefined
const enter = document.querySelector('.sign-in');
const backgroundForm = document.querySelector('.backgroundForm');
const login = document.querySelector('.login');
enter.addEventListener('click', function() {
backgroundForm.classList.toggle('active');
login.classList.toggle('active');
});
const enter = document.getElementsByClassName('sign-in')[0];
const backgroundForm = document.getElementsByClassName('backgroundForm')[0];
const login = document.getElementsByClassName('login')[0];
enter.addEventListener('click', function() {
backgroundForm.classList.toggle('active');
login.classList.toggle('active');
});