-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
57 lines (53 loc) · 1.81 KB
/
index.html
File metadata and controls
57 lines (53 loc) · 1.81 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
<!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>Code Wars - Brett Crafton</title>
<!-- external CSS links -->
<link rel="stylesheet" href="../assets/css/normalize.css">
<link rel="stylesheet" href="../assets/css/style.css">
<link rel="stylesheet" href="../assets/darkModePrism/prism.css">
</head>
<body>
<header>
</header>
<body>
<h1>What is between?</h1><!--TITLE *********************** -->
<h2>Question</h2>
<section>
<!-- CODE QUESTION START -->
<pre><p>
Complete the function that takes two integers (a, b, where a < b)
and return an array of all integers between the input parameters,
including them.
For example:
</p><code class="language-javascript">
a = 1
b = 4
--> [1, 2, 3, 4]
</code></pre>
<!-- CODE QUESTION END -->
<p><strong>Solution by</strong> - <a target="_blank" rel="noopener noreferrer" href="https://github.com/BrettCrafton" target="_blank"><span class="background-black"><img height="30px" src="../assets/logo.svg" alt=""></span></a></p>
</section>
<h2>My Solution</h2>
<section>
<!-- CODE SOLUTION START -->
<pre><code class="language-javascript">
function between(a, b) {
let arr =[]
for(let i = a; i <= b; i++){
arr.push(i)
}
return arr
}
</code></pre>
<!-- CODE SOLUTION END -->
<!-- CODEWARS LINK -->
<p><strong>Try it yourself</strong> - <a target="_blank" rel="noopener noreferrer" href="https://www.codewars.com/kata/55ecd718f46fba02e5000029/train/javascript"><span>CodeWars</span></a></p>
</section>
<!-- Prism JS FILE -->
<script src="../assets/darkModePrism/prism.js"></script>
</body>
</html>