-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
86 lines (86 loc) · 2.67 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html>
<head>
<script src="scripts/01-fundamentals.js"></script>
<script src="scripts/03-objects.js"></script>
<title>The Modern JavaScript Tutorial practice tasks - Philip Wong</title>
</head>
<body>
<h1>The Modern JavaScript Tutorial practice tasks - Philip Wong</h1>
<div>
This work is handcoded by
<a href="https://github.com/p2635/modern-js-tutorial">Philip Wong</a>,
based on the tasks taken from
<a href="https://javascript.info">javascript.info</a>.
</div>
<h2>Part 1</h2>
<ul>
<li>
Task 1a - Display alert where the script resides in this very file.
<button type="button" onclick="javascript:alert( 'I\'m JavaScript!' );">
Click me!
</button>
</li>
<li>
Task 1b - Display alert where the script resides externally.
<button type="button" onclick="javascript:showAlert();">
Click me!
</button>
</li>
<li>
Task 2.6 - Ask for user's name and output it.
<button type="button" onclick="javascript:askForName();">
Click me!
</button>
</li>
<li>
Task 2.10 - if..else the name of javascript.
<button type="button" onclick="javascript:ifElse();">Click me!</button>
</li>
<li>
Task 2.10 - Show the sign.
<button type="button" onclick="javascript:showTheSign();">
Click me!
</button>
</li>
<li>
Task 2.11 - Check login.
<button type="button" onclick="javascript:checkLogin();">
Click me!
</button>
</li>
<li>
Task 2.13 - for loop to increment from 2 to 10.
<button type="button" onclick="javascript:forLoop();">Click me!</button>
</li>
<li>
Task 2.13 - Rewrite a for loop to a while loop.
<button type="button" onclick="javascript:forToWhile();">
Click me!
</button>
</li>
<li>
Task 2.13 - Repeat until the input is correct.
<button type="button" onclick="javascript:repeatUntilCorrect2();">
Click me!
</button>
</li>
<li>
Task 2.13 - Output prime numbers from 2 to n (default 10).
<button type="button" onclick="javascript:primeNumbers();">
Click me!
</button>
</li>
<li>
Task 2.15 - A function pow(x, n) that returns x in power n.
<button type="button" onclick="javascript:powTask();">Click me!</button>
</li>
<li>
Task 2.17 - Arrow function.
<button type="button" onclick="javascript:arrowFunction();">
Click me!
</button>
</li>
</ul>
</body>
</html>