0Pricing
Javascript for Kids · Lesson

Number Patterns

Print sequences.

Number Patterns is a free Javascript for Kids lesson on CoddyKit — lesson 4 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.

Patterns Everywhere! ✨

Look around! Stripes on a zebra 🦓, tiles on a floor, bricks in a wall. Those are patterns!

Loops are amazing at making number patterns. Let us try!

Squares Pattern 🟦

A square number is a number times itself! Let us print 1, 4, 9, 16 using i * i.

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

Doubles Pattern ✌️

Each number is double the count! 2, 4, 6, 8. Use i * 2.

for (let i = 1; i <= 4; i++) {
  console.log(i * 2)
}

Even and Odd 🔢

We can show pairs! Print the number and its double together.

for (let i = 1; i <= 3; i++) {
  console.log(i + ' makes ' + (i * 2))
}

Adding Pattern ➕

Let us add 10 to each number: 11, 12, 13, 14, 15!

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

Star Lines ⭐

We can repeat letters too! Print a row of stars that grows... wait, that is next lesson! For now, fixed stars.

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

Triangle Numbers 🔺

Cool pattern! Add up to each number: 1, then 1+2, then 1+2+3. Let us build it!

let total = 0
for (let i = 1; i <= 4; i++) {
  total = total + i
  console.log(total)
}

What Is total? 💰

The total is like a piggy bank! 🐷 Each turn we add the new number to it.

So it grows: 1, 3, 6, 10!

let total = 0
for (let i = 1; i <= 3; i++) {
  total = total + i
  console.log('total is now ' + total)
}

Money Pattern 💵

Imagine saving 5 coins every day! Let us track our growing savings.

let coins = 0
for (let i = 1; i <= 4; i++) {
  coins = coins + 5
  console.log('Day ' + i + ': ' + coins + ' coins')
}

Mix Two Patterns 🎨

Let us print a number and its square side by side!

for (let i = 1; i <= 4; i++) {
  console.log(i + ' squared is ' + (i * i))
}

Your Turn to Pattern 🌟

Try changing i * 3 to i * 4 and run! Make your own pattern. ✨

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

Quick Check ✅

Pattern brain check! 🧠

Patterns Recap 🎉

Beautiful patterns! ✨ You learned to make number sequences.

  • Use math on the counter like i * i or i * 2
  • A total piggy bank can add up numbers
  • Mix patterns into fun messages

Next course: loops INSIDE loops to make art! 🎨

Frequently asked questions

Is the “Number Patterns” lesson free?

Yes — the full text of “Number Patterns” 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 “Number Patterns”?

Print sequences. 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 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Number Patterns” 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 Up
  2. Counting by Steps
  3. Counting Down
  4. Number Patterns
← Back to Javascript for Kids