There is something that I dod not understand about javascript. The two "footer" statements below are identical. The first one prints a year in the copyright message. The second does not. It is as if the first one runs the javascript routine to get the year, but the second cannot. Some sort of reset is needed. What do I need to do in order to invoke the js more than once.
Thanks.
<footer id="Copyright" class="py-4 mb-4 bg-primary text-white text-center">
Copyright © <span></span> Fred Software, Inc. All Rights Reserved.
</footer>
<footer id="Copyright2" class="py-4 mb-4 bg-primary text-white text-center">
Copyright © <span></span> Fred Software, Inc. All Rights Reserved.
</footer>
<script src="{% static '/js/main.js' %}"></script>
where main.js consists of: const date = new Date(); document.querySelector('.year').innerHTML = date.getFullYear();