Problem

Infinite Multiplication Table

HTML, JavaScript 30 minutes 5 tests

Write a program that generates an infinite multiplication table using only if-else statements. The table should display the multiplication of numbers starting from 1.

Requirements

  • Must be valid HTML with basic doc structure (<html>, <head>, <body>, <script>)
  • Use only if-else conditions (no loops or other control structures)
  • Declare variables: var a = 1; var x = 1;
  • Create a function named printTables()
  • Use getElementById to update display element
  • Main logic

What you're graded on

  • 1Valid HTML structure
  • 2Required variables declared
  • 3Required function defined
  • 4If-else logic used
  • 5Code runs, produces output, and handles the x=10 boundary correctly
solution.html
Ln 1, Col 1Spaces: 4
HTML + JavaScript
Test results
Run your code to see test results here.
Submitting is final. Run the tests first.