{"size": 844, "ext": "js", "max_stars_repo_path": "landing_page.js", "max_stars_repo_name": "johnpham0527/my-responsive-web-projects", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "landing_page.js", "max_issues_repo_name": "johnpham0527/my-responsive-web-projects", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "landing_page.js", "max_forks_repo_name": "johnpham0527/my-responsive-web-projects", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 60.2857142857, "max_line_length": 140, "alphanum_fraction": 0.6836492891}
"use strict";

(function () {
    let programsContainer = document.querySelector("#visit-container"); //look for programs-container ID
    let navBar = document.querySelector("#nav-bar");
    let sections = programsContainer.children; //access the HTML collection that contains the sections
    for (let i = 0; i < sections.length; i++) {
        let currentString = sections[i].children[0].innerText; //access each section h3 heading text
        let currentStringUnderscores = currentString.replace(" ", "_"); //replace spaces with underscores
        let linkTag = document.createElement("a"); //create link tag
        linkTag.innerHTML = '<a href="#' + currentStringUnderscores + '" class="nav-link">' + currentString + '</a>'; //create HTML for link
        navBar.appendChild(linkTag); //append link tag to the navigation bar
    }
})();