-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChallenge7.html
More file actions
44 lines (33 loc) · 1019 Bytes
/
Copy pathChallenge7.html
File metadata and controls
44 lines (33 loc) · 1019 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JavaScript Basic Challenges:Challenge 7</title>
</head>
<body>
<h1>JavaScript Basic Challenges</h1>
<h2>Challenge 7</h2>
<script>
var whole_no = prompt("enter a whole number?");
// var first_name = "Thomas";
// var last_name = "Battey";
// var adjective = "well read"
if(whole_no < 10)
{
console.log("You entered a number smaller than 10");
for(var x=0; x<10; x++)
{
console.log("Here is a " + x);
}
}
else if (whole_no> 9) {
console.log("You entered a big number");
}
else {
console.log("ERROR: you didn't enter a number")
}
</script>
</body>
</html>