html
html
1
2
3
4
5
6
7
8
9
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
body {
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//for n number of tables
function tables(num) {
for(var i = 1; i <= num; i++) {
for(var j = 1; j <= 10; j++) {
document.write((`${i} × ${j} = ${i*j}`));
//i+"×"+j+"="+i*j+"<br>"
document.write("<br>");
}
document.write("<br><br>");
}
}
tables(12);
//for particular table
function table(num) {
for(var i = 1,j=num; i <= 10; i++) {
//document.write(num+' × '+i+' = '+j*i+'<br>');
console.log(num+' × '+i+' = '+j*i);
}
}
table(prompt("Table Number",""));
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run