let elem, makeActive;
elems = document.getElementsByClassName('nav__link');
makeActive = function () {
for (let i = 0; i < elems.length; i++){
elems[i].classList.remove('active');
this.classList.add('active');
}
};
for (let i = 0; i < elems.length; i++){
elems[i].addEventListener('mousedown', makeActive);
}