scrimba
Note at 0:56
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Note at 0:56
AboutCommentsNotes
Note at 0:56
Expand for more info
index.js
run
preview
console
const meter = document.getElementById("meter")
const daysLeft = document.getElementById('daysLeft')
// Task:
// Write a function to wire up the festivity loader to reflect how many days are remaining until Christmas!
function remaining() {
const currentDate = new Date()
meter.setAttribute('value', 25 - currentDate.getDate())
daysLeft.textContent = 25 - currentDate.getDate() +" days left to Christmas! 🎅"
}
remaining()
// Stretch goals:
// - Animate the loader.
// - Change the colors depending on the meter's value.
Console
/index.html
LIVE