-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
65 lines (55 loc) · 2.06 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Array methods</title>
</head>
<body>
<h2>Array methods</h2>
<div id="add-array-number">
<div class="input-fields">
<fieldset>
<legend>Give your array of numbers:</legend>
<input type="text" class="inputs" id="input-array"> <br>
<button id="submit-array">Submit array</button>
</fieldset>
</div>
<div class="input-fields">
<fieldset>
<legend>Add a single number to your array:</legend>
<input type="number" class="inputs" id="input-numbers"> <br>
<button id="submit-numbers">Add number</button> <br>
</fieldset>
</div>
</div>
<p id="your-array" class="array">[ ]</p>
<button id="reset">Reset</button>
<fieldset id="choose-method">
<legend>Choose a method:</legend>
<ul>
<li>
<input type="radio" name="method" id="map1">
<label for="map1" class="radio-label">Map method - duplicates number</label>
</li>
<li>
<input type="radio" name="method" id="map2">
<label for="map2" class="radio-label">Map method - multiplies number by its index</label>
</li>
<li>
<input type="radio" name="method" id="filter">
<label for="filter" class="radio-label">Filter method - numbers divisible by two</label>
</li>
<li>
<input type="radio" name="method" id="reduce">
<label for="reduce" class="radio-label">Reduce method - sum of array</label>
</li>
</ul>
</fieldset>
<button id="output-button">Show result</button>
<p id="output" class="array"></p>
<script src="script.js"></script>
</body>
</html>