-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patholdindex.html
43 lines (32 loc) · 1.72 KB
/
oldindex.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Your description goes here">
<meta name="keywords" content="one, two, three">
<title>Karsy's Codewars Solutions</title>
<!-- external CSS link -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<h1>Karsy's Codewars JS Training</h1>
<nav>
<label for="solutions">Training Challenge</label>
<select name="" id="solutions">
<option value="">asdfasdf</option>
</select>
</nav>
<main>
<section class="cont-1">
<h2>The Challenge</h2>
<pre><code id="codeGoesHere">// Number of days in a month<br>// Write a program that accepts a month number (between 1 and 12), then shows the number of days of that month. Leap years are excluded. Incorrect inputs must be taken into account.</code></pre>
<h2>The Code</h2>
<pre><code id="codeGoesHere">let monthNumber = Number(prompt("Enter a month number (Example: 2 = Feburary):"))<br>if ((monthNumber === 1) || (monthNumber === 3) || (monthNumber === 5) || (monthNumber === 7) || (monthNumber === 8) || (monthNumber === 10) || (monthNumber === 12)) {<br> console.log("This Month has 31 Days")<br>} else if (monthNumber === 2) {<br> console.log("This Month has 28 Days and 29 on Leap Years")<br>} else if ((monthNumber === 4) || (monthNumber === 6) || (monthNumber === 9) || (monthNumber === 11)) {<br> console.log("This Month has 30 Days")<br>} else {<br> console.log("You did not type a number between 1 and 12")</code></pre>
<button onclick="">Run Code</button>
</section>
</main>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>
<!-- Karsyz -->