0

I am new to coding but I tried something was there any other easy and small way for it. https://code.sololearn.com/W8sSXS9oAw6x/

https://code.sololearn.com/W8sSXS9oAw6x/?ref=app

14th Oct 2020, 11:54 AM
Charchit Dahiya
Charchit Dahiya - avatar
8 Respostas
+ 1
Paste it instead of your js
14th Oct 2020, 12:51 PM
Ruba Kh
Ruba Kh - avatar
+ 1
Maybe you want something like this alert("write the number whose table you want to learn"); alert("do not leave it blank nothing will come") var z = prompt ("enter number"); for(let i=1;i<=10;i++){ let y = (z*10); document.write(`${z}×${i}=${y}<br>`) }
14th Oct 2020, 12:46 PM
Ruba Kh
Ruba Kh - avatar
+ 1
Thanks a lot
14th Oct 2020, 1:24 PM
Charchit Dahiya
Charchit Dahiya - avatar
0
Please tell
14th Oct 2020, 11:55 AM
Charchit Dahiya
Charchit Dahiya - avatar
0
Please tell
14th Oct 2020, 12:16 PM
Charchit Dahiya
Charchit Dahiya - avatar
0
It is in which section of sololearn js or html or any other please tell
14th Oct 2020, 12:50 PM
Charchit Dahiya
Charchit Dahiya - avatar
0
But I didn't understand it
14th Oct 2020, 12:59 PM
Charchit Dahiya
Charchit Dahiya - avatar
0
It is a loop it will loop from 1 to 10 and each time will multiply z with the number. For the document.write when you use `` you can pass variables inside if you put the variable inside ${} so it will print z × i = y Where z is the number the user entered, i is changing each time starting from 1 until 10, y is z*i
14th Oct 2020, 1:04 PM
Ruba Kh
Ruba Kh - avatar