A Times Table
Print multiplication.
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))
}All lessons in this course
- A Loop Inside a Loop
- Rows and Columns
- Star Triangles
- A Times Table