0Pricing
Javascript for Kids · Lesson

Counting Down to Zero

From ten to zero.

Counting Down to Zero is a free Javascript for Kids lesson on CoddyKit — lesson 1 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.

Countdown Time! 🚀

Get ready to launch a rocket! 🚀 In Countdown Timer we count from ten all the way down to zero! 🔟

console.log('Get ready to count down! 🚀')

Counting Up First ⬆️

Before counting down, let's count UP from 1 to 5 with a loop. ⬆️

for (let i = 1; i <= 5; i++) {
  console.log(i)
}

Now Count Down ⬇️

To count down we start big and go down using i--. ⬇️

for (let i = 5; i >= 1; i--) {
  console.log(i)
}

The Minus Minus ➖

i-- means subtract 1 each time, the opposite of i++. ➖

let i = 3
i--
console.log(i)
i--
console.log(i)

Start at Ten 🔟

A real rocket countdown starts at 10! Let's count down from ten. 🔟

for (let i = 10; i >= 0; i--) {
  console.log(i)
}

Down to Zero 0️⃣

We use i >= 0 so the loop includes zero, the last number! 0️⃣

for (let i = 3; i >= 0; i--) {
  console.log('Count:', i)
}

Add Fun Words 🗨️

Let's make it exciting by adding words to each number! 🗨️

for (let i = 3; i >= 1; i--) {
  console.log(i + '...')
}

A Special Last Word 🎉

When we reach zero, show something special! 🎉

for (let i = 3; i >= 0; i--) {
  if (i === 0) {
    console.log('GO! 🎉')
  } else {
    console.log(i)
  }
}

Count Down by Twos ✌️

We can count down by 2 with i -= 2! ✌️

for (let i = 10; i >= 0; i -= 2) {
  console.log(i)
}

A Countdown Function 🛠️

Let's make a reusable countdown for any starting number! 🛠️

function countdown(start) {
  for (let i = start; i >= 0; i--) {
    console.log(i)
  }
}
countdown(5)

Full Countdown 🎮

Here is a complete countdown from ten to liftoff! 🎮🚀

for (let i = 10; i >= 1; i--) {
  console.log(i + '...')
}
console.log('Liftoff! 🚀')

Quick Check ✅

Test your counting skills! 🧠

Counter Pro! 🌟

Awesome! You can count down to zero! 🎉

  • Start big, use i-- ⬇️
  • Use i >= 0 to reach zero 0️⃣
  • Add fun words and emojis 🗨️

Next: waiting between numbers! ⏱️

console.log('Counting down: LEARNED! 🌟')

Frequently asked questions

Is the “Counting Down to Zero” lesson free?

Yes — the full text of “Counting Down to Zero” 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 “Counting Down to Zero”?

From ten to zero. 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 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Counting Down to Zero” 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.

All lessons in this course

  1. Counting Down to Zero
  2. Waiting with setTimeout
  3. Blast Off!
  4. Your Own Timer
← Back to Javascript for Kids