Write a JavaScript that accepts a number from the user using the “prompt” function
Posted
by A sw A
on Stack Overflow
See other posts from Stack Overflow
or by A sw A
Published on 2010-03-08T17:02:59Z
Indexed on
2010/03/08
17:06 UTC
Read the original article
Hit count: 125
JavaScript
Write a JavaScript that accepts a number from the user using the “prompt” function. Then it draws a table in the HTML document that has the user specified number of rows and columns.
In each table data, it displays the result of the math operation (row raised to the power of column). For example, if the user enters the number 3
, the JavaScript should draw the following table:
1 1 1
2 4 8
3 9 27
© Stack Overflow or respective owner