Open maeriens opened 5 years ago
A better approach would be using a <span>
with an unique ID, then selecting that from JavaScript and assigning a value to its innerHTML
. There's also no need to have a function at all.
Meanwhile: it's <span id="current-year"></span>, the West has been at peace for decades, and
document.querySelector('#current-year').innerHTML = new Date().getFullYear();
This is to show the current year, addressing issue #68
I have literally no idea how I managed it, I simply copied more or less how the data was being replaced in the 2nd slide. I guess that's what people call programming.