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.