A Times Table
Print multiplication.
A Times Table 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.
Times Table Magic! ✖️
A times table helps you multiply fast! Like 2×1=2, 2×2=4, 2×3=6.
Instead of writing them all by hand, let us make the COMPUTER print them with loops! 🪄
One Times Table 2️⃣
Let us print the 2 times table using a single loop! Multiply 2 by each number.
for (let n = 1; n <= 5; n++) {
console.log('2 x ' + n + ' = ' + (2 * n))
}The 5 Times Table 5️⃣
Change the 2 to a 5 and you get the 5 times table! Easy peasy. 🍋
for (let n = 1; n <= 5; n++) {
console.log('5 x ' + n + ' = ' + (5 * n))
}Go Up to 10 🔟
Times tables usually go to 10! Let us print the full 3 times table.
for (let n = 1; n <= 10; n++) {
console.log('3 x ' + n + ' = ' + (3 * n))
}All Tables at Once! 🤯
Now the cool part! A NESTED loop prints EVERY times table from 1 to 3. Outer = which table, inner = the rows.
for (let t = 1; t <= 3; t++) {
for (let n = 1; n <= 3; n++) {
console.log(t + ' x ' + n + ' = ' + (t * n))
}
}Add a Title Line 🏷️
Let us show which table we are on before each one!
for (let t = 1; t <= 3; t++) {
console.log('--- ' + t + ' times table ---')
for (let n = 1; n <= 3; n++) {
console.log(t + ' x ' + n + ' = ' + (t * n))
}
}A Times Table Grid 🔲
Let us put a whole row on ONE line! Build the row text with the inner loop.
for (let t = 1; t <= 3; t++) {
let row = ''
for (let n = 1; n <= 3; n++) {
row = row + (t * n) + ' '
}
console.log(row)
}Bigger Grid 📐
Let us grow it to a 5 by 5 multiplication grid! So many answers at once.
for (let t = 1; t <= 5; t++) {
let row = ''
for (let n = 1; n <= 5; n++) {
row = row + (t * n) + ' '
}
console.log(row)
}Doubles Are Squares 🟦
Fun fact! When the table number equals the row number, you get a SQUARE number. Let us show just those.
for (let n = 1; n <= 5; n++) {
console.log(n + ' x ' + n + ' = ' + (n * n))
}Practice Quiz Style 🎯
Let us print the 7 times table to study! 7 is a tricky one. 💪
for (let n = 1; n <= 10; n++) {
console.log('7 x ' + n + ' = ' + (7 * n))
}Your Turn to Multiply 🌟
Change the 6 to YOUR favorite number and print its times table! Edit and run. ✨
for (let n = 1; n <= 10; n++) {
console.log('6 x ' + n + ' = ' + (6 * n))
}Quick Check ✅
Times table brain check! 🧠
Times Table Recap 🎉
Multiplication master! ✖️ You finished the course!
- One loop prints one times table
- A nested loop prints ALL of them
- You can build neat grids of answers
You learned objects AND loops AND nested loop art! Amazing job, coder! 🏆🎨
Frequently asked questions
Is the “A Times Table” lesson free?
Yes — the full text of “A Times Table” 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 “A Times Table”?
Print multiplication. 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 “A Times Table” 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
- A Loop Inside a Loop
- Rows and Columns
- Star Triangles
- A Times Table