I want to use a script using JavaScript that updates an element in the footer of a website. However, the h3 element isn't getting updated.
I have tried textContent not updating HTML, but I wasn't able to find my solution there.
Here is my CodePen: https://codepen.io/martinlutherwinn/pen/NWPvRpZ
This is my current code:
<div class="Footer">
<h3></h3>
</div>
var copyrightedYear = (function() {
var header = document.getElementsByClassName("Footer")[0].textContent;
var currentDate = new Date();
var currentYear = currentDate.getFullYear();
var msg = "@" + currentYear + " Haitian Educators of Palm Beach.";
header = msg;
}());