, appendedId) {
    if (!element.id) {
      element.id = `${element.innerHTML
        .replace(/:/g, "")
        .trim()
        .toLowerCase()
        .split(" ")
        .join("-")}-${appendedId}`;
    }
  }
    
  function addNavLink(heading, currentSectionList) {
    let listItem = document.createElement("li");
    let anchor = document.createElement("a");
    anchor.innerHTML = heading.innerHTML;
    anchor.id = `${heading.id}-link`;
    anchor.href = `#${heading.id}`;
    listItem.appendChild(anchor)