Last active
May 2, 2023 18:05
-
-
Save hsnyc/7a93d16acf5a47a04a9eae8141c61a8a to your computer and use it in GitHub Desktop.
Update the Year in the page footer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<footer> | |
<div class="wrapper">©<span id="current-year">2019</span> HSNYC</div> | |
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place Current Year in Page Footer ===================// | |
let date = new Date(); | |
let currentYear = date.getFullYear(); | |
let yearSpan = document.getElementById('current-year'); | |
yearSpan.innerHTML = currentYear; | |
// End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment