JavaScript Add Navbar Link

var link = document.createElement('a');
link.classList.add('menu__link');
link.href = '#section1';
link.textContent = 'Section 1';
document.getElementById('navbar__list').appendChild(link);
Arno Deceuninck