From 14378888235305ee8f2dec5c21fb89b178b5ba82 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Thu, 25 Nov 2021 19:58:56 +0530 Subject: [PATCH] cleanup --- Chapter 11/ex4 | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 Chapter 11/ex4 diff --git a/Chapter 11/ex4 b/Chapter 11/ex4 deleted file mode 100644 index ac8a9c0..0000000 --- a/Chapter 11/ex4 +++ /dev/null @@ -1,23 +0,0 @@ - const endDate = "Sept 1 2022"; - update(); - function update() { - const temp = countdown(); - for (const property in temp) { - console.log(`${property}: ${temp[property]}`); - } - window.setTimeout(update, 1000); - } - function countdown() { - const total = Date.parse(endDate) - new Date(); - const days = Math.floor(total / (1000 * 60 * 60 * 24)); - const hrs = Math.floor((total / (1000 * 60 * 60)) % 24); - const mins = Math.floor((total / 1000 / 60) % 60); - const secs = Math.floor((total / 1000) % 60); - return { - total, - days, - hrs, - mins, - secs - }; - }