Blast Off!
Finish the countdown.
Blast Off! is a free Javascript for Kids lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Javascript for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Blast Off! 🚀
Now we finish the countdown with an exciting BLAST OFF when we reach zero! 🚀🎉
console.log('Prepare for launch! 🚀')The Ending Matters 🎯
A countdown without a finish is boring! When we hit zero, something cool should happen. 🎯
let i = 0
if (i === 0) {
console.log('BLAST OFF! 🚀')
}Check for Zero 0️⃣
We use if (i === 0) to know when the countdown is finished. 0️⃣
for (let i = 3; i >= 0; i--) {
if (i === 0) console.log('GO!')
else console.log(i)
}A Big Celebration 🎆
Let's add lots of emojis for a big finish! 🎆🎉🚀
console.log('3')
console.log('2')
console.log('1')
console.log('BLAST OFF! 🚀🎆🎉')Stop the Timer at Zero 🛑
With a timer, we stop it the moment we blast off so it doesn't keep going! 🛑
let i = 3
let timer = setInterval(function () {
if (i === 0) {
console.log('BLAST OFF! 🚀')
clearInterval(timer)
} else {
console.log(i)
i--
}
}, 1000)Print After Liftoff 🌙
After blast off, we can show the rocket flying to the moon! 🌙
console.log('BLAST OFF! 🚀')
console.log('Flying to the moon! 🌙')Final Countdown Words 🗨️
Let's give the last few numbers extra excitement! 🗨️
console.log('3 - get ready!')
console.log('2 - almost!')
console.log('1 - here we go!')
console.log('0 - BLAST OFF! 🚀')A Blast Off Function 🛠️
Let's wrap the whole launch in one reusable function! 🛠️
function launch(start) {
for (let i = start; i >= 1; i--) console.log(i)
console.log('BLAST OFF! 🚀')
}
launch(5)Choose Your Word ✨
Not just rockets! You could say 'Surprise!' or 'Happy New Year!' at zero. ✨
for (let i = 3; i >= 1; i--) console.log(i)
console.log('Happy New Year! 🎉')Timer Blast Off ⏱️
Here is the timer version that counts down each second and blasts off! ⏱️🚀
let i = 5
let t = setInterval(function () {
if (i > 0) { console.log(i); i-- }
else { console.log('BLAST OFF! 🚀'); clearInterval(t) }
}, 1000)Full Launch 🎮
Here is the complete rocket launch from ten! 🎮🚀
for (let i = 10; i >= 1; i--) {
console.log(i + '...')
}
console.log('BLAST OFF! 🚀🎆')Quick Check ✅
Test your launch skills! 🧠
Launch Master! 🌟
3, 2, 1... AWESOME! You finished the blast off! 🎉
- Check for zero 0️⃣
- Stop the timer 🛑
- Add a big celebration 🎆
Last step: make your OWN timer! 🛠️
console.log('Blast off: MASTERED! 🌟🚀')Frequently asked questions
Is the “Blast Off!” lesson free?
Yes — the full text of “Blast Off!” is free to read here on the web, and the Javascript for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Javascript for Kids course, upgrade to CoddyKit PRO.
What will I learn in “Blast Off!”?
Finish the countdown. You practise Javascript for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Javascript for Kids?
No prior experience is required. Javascript for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Blast Off!” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Javascript for Kids lesson?
Yes. Every Javascript for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.