html
html
1
2
3
4
5
6
7
8
9
10
11
12
<!-- Created by Your Mom -->
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<button onclick="numbers()">numbers</button>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
/* Created by Your Mom */
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
// Created by Your Mom
let str = "" //init
function numbers() {
let numq1 = prompt("SPACE or COMMA?")
let numq2 = prompt("What is the minumum number you want?");
let numq3 = prompt("What is the maximum number ya want?");
/* Convert to number */
numq2 = parseInt(numq2);
numq3 = parseInt(numq3);
while(numq1 === "SPACE" && numq2 < numq3) {
numq2++;
//document.write(numq2);
str = str + "" + numq2 + " ";
}
document.write(str)
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run