-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathassignment.html
77 lines (61 loc) · 3.39 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
72
73
74
75
76
77
<!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: Loops and Arrays Revisited | 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">findSmallestNumber</code>. This function should take in the array, <code class="inline">myNumbers</code>. Loop through the array and return the smallest number.
</li>
<li class="list-item">
Create a function called <code class="inline">findLargestNumber</code>. This function should take in the array, <code class="inline">myNumbers</code>. Loop through the array and return the largest number.
</li>
<li class="list-item">
Create a function called <code class="inline">findAverage</code>. This function should take in the array, <code class="inline">myNumbers</code>. Loop through the array and return the average.
</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">findSmallestNumber</code>.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">25</code></li>
<li class="list-item">Actual: <code id="smallest-number" class="inline-code"></code></li>
</ul>
<li class="list-item">Output the result of <code class="inline-code">findLargestNumber</code>.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">354</code></li>
<li class="list-item">Actual: <code id="largest-number" class="inline-code"></code></li>
</ul>
<li class="list-item">Output the result of <code class="inline-code">findAverage</code>.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">123.55555555555556</code></li>
<li class="list-item">Actual: <code id="average-number" 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>