forked from semmypurewal/LearningWebAppDev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomework3.html
More file actions
94 lines (94 loc) · 4.73 KB
/
Copy pathhomework3.html
File metadata and controls
94 lines (94 loc) · 4.73 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
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
92
93
94
<!doctype html>
<html>
<head>
</head>
<body>
<div class="answerContent">
<p class="title">1. Average of Numbers</p>
<p class="header">- Separate numbers with comma(,) (eg. 1,2,3,4,5)</p>
<input type="text" id="averageSumTextField"></input>
<button onclick="getAverageNums()">Calculate</button>
<p id="averageSum"></p>
</div>
<hr>
<div class="answerContent">
<p class="title">2. Get Largest Number</p>
<p class="header">- Separate numbers with comma(,) (eg. 1,2,3,4,5)</p>
<input type="text" id="largestNumTextField"></input>
<button onclick="getLargestNum()">Calculate</button>
<p id="largestNum"></p>
</div>
<hr>
<div class="answerContent">
<p class="title">3. Find Even Number</p>
<p class="header">- Separate numbers with comma(,) (eg. 1,2,3,4,5)</p>
<input type="text" id="findEvenNumTextField"></input>
<button onclick="findEvenNum()">Calculate</button>
<p id="evenNum"></p>
</div>
<hr>
<div>
<p class="title">4. Validate Even Number</p>
<p class="header">- Separate numbers with comma(,) (eg. 1,2,3,4,5)</p>
<input type="text" id="validateEvenNumTextField"></input>
<button onclick="validateEvenNums()">Calculate</button>
<p id="evenNums"></p>
</div>
<div>
<p class="title">5. Array Contains a String</p>
<p class="header">- Input array of strings on left field and a string to find on right</p>
<input type="text" id="arrayTextField"></input>
<input type="text" id="stringTextField"></input>
<button onclick="checkArrayContains()">Calculate</button>
<p id="isArrayContains"></p>
</div>
<div>
<p class="title">6.1. Array Contains a String at Least Twice</p>
<p class="header">- Input array of strings on left field and a string to find on right</p>
<input type="text" id="arrayForTwiceTextField"></input>
<input type="text" id="stringForTwiceTextField"></input>
<button onclick="checkArrayContainsAtLeatTwice()">Calculate</button>
<p id="isArrayContainsTwice"></p>
</div>
<div>
<p class="title">6.2. Array Contains a String at Least Three Times</p>
<p class="header">- Input array of strings on left field and a string to find on right</p>
<input type="text" id="arrayForThreeTimesTextField"></input>
<input type="text" id="stringForThreeTimesTextField"></input>
<button onclick="checkArrayContainsAtLeatThreeTimes()">Calculate</button>
<p id="isArrayContainsThreeTimes"></p>
</div>
<div>
<p class="title">6.3. Array Contains a String at Least n Times</p>
<p class="header">- Input array of strings on left field, a string to find on middle, n times on right</p>
<input type="text" id="arrayForNTimesTextField"></input>
<input type="text" id="stringForNTimesTextField"></input>
<input type="text" id="nTimesTextField"></input>
<button onclick="checkArrayContainsAtLeatNTimes()">Calculate</button>
<p id="isArrayContainsNTimes"></p>
</div>
<div class="answerContent">
<p class="title">7. Get Largest Number Using underscore.js</p>
<p class="header">- Separate numbers with comma(,) (eg. 1,2,3,4,5)</p>
<input type="text" id="largestNumTextUnderScoreField"></input>
<button onclick="getLargestNumUnderscore()">Calculate</button>
<p id="largestNumUnderScore"></p>
</div>
<div class="answerContent">
<p class="title">8. Find Even Number Using underscore.js</p>
<p class="header">- Separate numbers with comma(,) (eg. 1,2,3,4,5)</p>
<input type="text" id="findEvenNumUnderScoreTextField"></input>
<button onclick="findEvenNumUnderScore()">Calculate</button>
<p id="evenNumUnderScore"></p>
</div>
<div>
<p class="title">9. Validate Even Number Using underscore.js</p>
<p class="header">- Separate numbers with comma(,) (eg. 1,2,3,4,5)</p>
<input type="text" id="validateEvenNumUnderScoreTextField"></input>
<button onclick="validateEvenNumsUnderScore()">Calculate</button>
<p id="evenNumsUnderScore"></p>
</div>
</body>
<script src="homework3.js"></script>
<script src="underscore.js"></script>
</html>