-
Notifications
You must be signed in to change notification settings - Fork 19
/
assignment.html
91 lines (73 loc) · 4.34 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!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: Arrays | 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 mutable variable named <code class="inline-code">shiftValue</code> and do not assign it a value.</li>
<li class="list-item">Create a mutable variable named <code class="inline-code">popValue</code> and do not assign it a value.</li>
<li class="list-item">Write the code for each step.</li>
</ul>
</p>
<h3 class="sub-title">Answer Ouput</h3>
<ol class="list ordered">
<li class="list-item">Output the <code class="inline-code">todo</code> array.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">Wash the dishes,Clean the gutters,Mow the yard,Do some coding,Rake the leaves</code></li>
<li class="list-item">Actual: <code id="answer-one" class="inline-code"></code></li>
</ul>
<li class="list-item">Output the third value in the <code class="inline-code">todo</code> array.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">Mow the yard</code></li>
<li class="list-item">Actual: <code id="answer-two" class="inline-code"></code></li>
</ul>
<li class="list-item">
Remove the last value of the array and store it in <code class="inline-code">popValue</code>.
</li>
<li class="list-item">Output the <code class="inline-code">todo</code> array.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">Wash the dishes,Clean the gutters,Mow the yard,Do some coding</code></li>
<li class="list-item">Actual: <code id="answer-four" class="inline-code"></code></li>
</ul>
<li class="list-item">Reverse the <code class="inline-code">todo</code> array.</li>
<li class="list-item">Output the <code class="inline-code">todo</code> array.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">Do some coding,Mow the yard,Clean the gutters,Wash the dishes</code>.</li>
<li class="list-item">Actual: <code id="answer-five" class="inline-code"></code>.</li>
</ul>
<li class="list-item">
Remove the first value of the array and store it in <code class="inline-code">shiftValue</code>.
</li>
<li class="list-item">
Add <code class="inline-code">shiftValue</code> and <code class="inline-code">popValue</code> to the end of the <code class="inline-code">todo</code> array in that order.
</li>
<li class="list-item">Output the <code class="inline-code">todo</code> array.</li>
<ul class="list">
<li class="list-item">Expected: <code class="inline-code">Mow the yard,Clean the gutters,Wash the dishes,Rake the leaves,Do some coding</code>.</li>
<li class="list-item">Actual: <code id="answer-six" 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>