-
Notifications
You must be signed in to change notification settings - Fork 11
/
assignment.html
71 lines (56 loc) · 3.32 KB
/
assignment.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css/style.css">
<title>Introduction to JS: Functions | Assignment</title>
</head>
<body>
<header class="header">
<nav class="nav">
<ul class="nav-list">
<li class="nav-item"><a href="/" class="link">Concept</a></li>
<li class="nav-item"><a href="./assignment.html" class="link">Assignment</a></li>
</ul>
</nav>
</header>
<main class="main">
<section class="concept">
<h2 class="title">Assignment</h2>
<p class="paragraph">Make the following changes in <code class="inline-code">assignment.js</code>. These values will be reflected in the "Answer Ouput" section.
</p>
<p class="paragraph">
<ul class="list">
<li class="list-item">Create a function called <code class="inline">returnTheRemainder</code> that returns the remainder of the division of two numbers. This function should take in two arguments and return a value.
</li>
<li class="list-item">Create a function called <code class="inline">checkIfEven</code>. This function should return <code class="inline">true</code> or <code class="inline">false</code> based on the input.</li>
<li class="list-item">Create a function called <code class="inline">getTheFourthElement</code>. This function should take in the existing array, <code class="inline">lostNumbers</code>, and return the fourth element of the array.</li>
<li class="list-item">Create the remaining functionality to render your answers.</li>
</ul>
</p>
<h3 class="sub-title">Answer Ouput</h3>
<ol class="list ordered">
<li class="list-item">Output the result of <code class="inline-code">returnTheRemainder</code> using the values <code class="inline">5</code> and <code class="inline">4</code>.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">1</code></li>
<li class="list-item">Actual: <code id="remainder" class="inline-code"></code></li>
</ul>
<li class="list-item">Output the result of <code class="inline-code">checkIfEven</code> using the value 47.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">false</code></li>
<li class="list-item">Actual: <code id="check-if-even" class="inline-code"></code></li>
</ul>
<li class="list-item">Output the result of <code class="inline-code">getTheFourthElement</code>.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">16</code></li>
<li class="list-item">Actual: <code id="lost-numbers" class="inline-code"></code></li>
</ul>
</ol>
<button id="submission-btn">Submit</button>
</section>
</main>
<footer></footer>
<script src="./js/assignment.js"></script>
</body>
</html>