scrimba
Note at 0:00
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:00
by Yuko
AboutCommentsNotes
Note at 0:00
by Yuko
Expand for more info
index.js
run
preview
console
const crew = document.getElementById("crew")
const btn = document.getElementById("btn")
const audio = new Audio("sleigh-bell-sound.mp3")


// Task:
// - Write a function to launch the sleigh!
// - See CSS for more tasks.

btn.addEventListener("click", ()=>{
crew.classList.add("slide-out-elliptic-top-bck");
setTimeout(()=> {audio.play()
setTimeout(()=> {
audio.pause();
audio.currentTime = 0;
}, 6000)
},500);
})

// Stretch goals:
// - Add a cheering sound when the sleigh takes off.
// - Add a countdown to the launch time.
Console
/index.html
LIVE