Created
December 12, 2016 20:46
-
-
Save davidblurton/ba08bb70ab6aeef93a97d6f6c8b16a6f to your computer and use it in GitHub Desktop.
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
function countdownToChristmas(date) { | |
const daysLeft = 24 - date | |
if (daysLeft > 0) { | |
return `${daysLeft} days till Christmas!` | |
} | |
} | |
const date = new Date().getDate() | |
countdownToChristmas(date).toUpperCase() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment