30 - Multiplication Table Generator, for loop practice (JS lessons)
📘 Task: Multiplication Table
Build a "Multiplication Table" application.
The user enters a number.
After clicking the button:
- Use a
for loop to build the multiplication table from 1 to 10
- Display all results on the page
📐 How it works:
- Read the user's number from the input field
- Run a
for loop from 1 to 10
- On each iteration multiply the user's number by the current loop value
- Add a line with the result to the HTML
- Formula: v × i = v * i
- Each loop iteration must create a separate
div with class row
🧪 Examples:
- 5 × 1 = 5
- 5 × 2 = 10
- 5 × 3 = 15
- 5 × 4 = 20
- 5 × 5 = 25
- 5 × 6 = 30
- 5 × 7 = 35
- 5 × 8 = 40
- 5 × 9 = 45
- 5 × 10 = 50
📌 Important:
Every row in the table must be created through the for loop.
Do not change anything in the HTML.