Hi,
How can I create a variable that contains the current year, and then use it within the page?
I've tried this:
<script>
// Return today's date and time
const currentTime = new Date()
// returns the year (four digits)
const year = currentTime.getFullYear()
</script>
But I can't seem to access the "year" variable from within the HTML?