+ 1

Please tell how to make table in JS or HTML

I mean a program asks the user for input (prompt) of any number and then returns table of that number E.g. if user says 2 Result should be 2 4 6 8 10 12 14 16 18 2p

26th Jul 2020, 5:09 AM
Raghu Rao
Raghu Rao - avatar
8 Answers
+ 9
Raghu Rao I think this what you asked Since you got the answer,I post the code here Next time,post question with your attempt Thanks! https://code.sololearn.com/WQdB6riDI6vQ/?ref=app
26th Jul 2020, 8:50 AM
Simba
Simba - avatar
+ 11
Raghu Rao show your attempt
26th Jul 2020, 6:50 AM
Simba
Simba - avatar
+ 2
Ok Thanks
26th Jul 2020, 9:18 AM
Raghu Rao
Raghu Rao - avatar
26th Jul 2020, 8:32 AM
Vadivelan
+ 1
The problem is that I have written i*i and it results in this 2 4 8 16 But I don't want this I want to know how to improve it
26th Jul 2020, 8:32 AM
Raghu Rao
Raghu Rao - avatar
+ 1
Thanks for the code
26th Jul 2020, 8:34 AM
Raghu Rao
Raghu Rao - avatar
0
I asked for numerical tables like 2 4 6 8 10 12 14 16 18 20 Not for the table you are sending Please read the description
26th Jul 2020, 5:16 AM
Raghu Rao
Raghu Rao - avatar
0
<html> <head> <title>multiplication tables</title> </head> <body> <script> var a=prompt("Please enter the number for which you want table"); do{ document.write( a + "<br />"); i*i; } while( i<=i*10); </script> </body> </html>
26th Jul 2020, 8:30 AM
Raghu Rao
Raghu Rao - avatar