From a personal project, why isn't it displaying the contect i have checked and i do not have any bugs ill appricate if given a hand on this one

const days = document.querySelectorAll("days");

const hours = document.querySelectorAll("hours");

const minutes = document.querySelectorAll("minutes");

const seconds = document.querySelectorAll("seconds");

const currentYear = new Date().getFullYear();

const newYearTime = new Date("January 1 2023 00:00:00");

//update countdown

function updateCountdownTime(){

 const currentTime = new Date();

 const diff = newYearTime - currentTime;

 const d = Math.floor(diff / 1000 / 3600 / 24)

 const h = Math.floor(diff / 1000 / 3600) % 24;

 const m = Math.floor(diff / 1000/ 69) % 60;

 const s = Math.floor(diff / 1000) % 60;

days.innerHTML = d;

hours.innerHTML = h;

minutes.innerHTML = m;

seconds.innerHtml = s;

}

setInterval(updateCountdownTime, 1000);

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.