Thanks to the new JS standards this can be done easily. All my a tags had the class nav-link. So I selected them all (which gave me a node list) and ran forEach over them all and added a function to call whenever one of the nodes were selected. Hope this helps!
let navLink = document.querySelectorAll('.nav-link');
const navbar = document.querySelector('#navbarNav');
closeNavBar = () => {
navbar.classList.remove('show');
};
navLink.forEach((nav) => nav.addEventListener('click', closeNavBar));