Introduction |
|
xiv | |
|
Part 1 The world of JavaScript |
|
|
|
|
2 | (24) |
|
|
4 | (2) |
|
|
5 | (1) |
|
JavaScript and the web browser |
|
|
6 | (1) |
|
Our first brush with JavaScript |
|
|
6 | (7) |
|
|
13 | (9) |
|
|
13 | (2) |
|
Getting Visual Studio Code |
|
|
15 | (1) |
|
|
16 | (3) |
|
Working on files with Visual Studio Code |
|
|
19 | (3) |
|
|
22 | (4) |
|
2 Hypertext Markup Language (HTML) |
|
|
26 | (36) |
|
HTML and the World Wide Web |
|
|
28 | (1) |
|
|
28 | (1) |
|
|
29 | (13) |
|
|
32 | (2) |
|
Lay out text in paragraphs |
|
|
34 | (1) |
|
|
35 | (1) |
|
|
35 | (3) |
|
Add comments to documents |
|
|
38 | (1) |
|
|
38 | (3) |
|
|
41 | (1) |
|
|
41 | (1) |
|
|
42 | (10) |
|
|
42 | (2) |
|
Reading input from a user |
|
|
44 | (5) |
|
|
49 | (3) |
|
|
52 | (5) |
|
Adding sound to the egg timer |
|
|
55 | (1) |
|
Controlling audio playback |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
58 | (4) |
|
3 Cascading Style Sheets (CSS) |
|
|
62 | (32) |
|
|
64 | (21) |
|
|
64 | (4) |
|
|
68 | (3) |
|
|
71 | (1) |
|
|
72 | (2) |
|
|
74 | (3) |
|
|
77 | (5) |
|
|
82 | (2) |
|
Formatting parts of a document using <div> and <span> |
|
|
84 | (1) |
|
|
85 | (2) |
|
Color highlighting using selectors |
|
|
86 | (1) |
|
|
87 | (7) |
|
Part 2 Coding with JavaScript |
|
|
|
|
94 | (50) |
|
Computers as data processors |
|
|
96 | (7) |
|
Programs as data processors |
|
|
98 | (1) |
|
JavaScript as a data processor |
|
|
99 | (1) |
|
Process data with expressions |
|
|
100 | (3) |
|
|
103 | (2) |
|
|
105 | (13) |
|
|
108 | (2) |
|
|
110 | (2) |
|
Whole numbers and real numbers |
|
|
112 | (2) |
|
Real numbers and floating-point numbers |
|
|
114 | (2) |
|
|
116 | (2) |
|
|
118 | (9) |
|
JavaScript string delimiters |
|
|
119 | (1) |
|
Escape sequences in strings |
|
|
120 | (1) |
|
Working with strings and numbers |
|
|
120 | (2) |
|
Converting strings into numbers |
|
|
122 | (2) |
|
|
124 | (3) |
|
|
127 | (6) |
|
Calculating a pizza order |
|
|
127 | (3) |
|
Converting between Fahrenheit and centigrade |
|
|
130 | (1) |
|
|
131 | (2) |
|
Global and local variables |
|
|
133 | (7) |
|
|
134 | (6) |
|
|
140 | (4) |
|
5 Making decisions in programs |
|
|
144 | (32) |
|
|
146 | (12) |
|
Boolean values in JavaScript |
|
|
146 | (3) |
|
|
149 | (5) |
|
|
154 | (4) |
|
|
158 | (3) |
|
|
159 | (2) |
|
Use decisions to make an application |
|
|
161 | (12) |
|
|
163 | (2) |
|
|
165 | (3) |
|
Using the switch construction |
|
|
168 | (5) |
|
|
173 | (3) |
|
6 Repeating actions in programs |
|
|
176 | (30) |
|
|
178 | (18) |
|
Adding data attributes to HTML elements |
|
|
184 | (4) |
|
Using an unordered list as a container |
|
|
188 | (3) |
|
|
191 | (4) |
|
Work through collections using for-of |
|
|
195 | (1) |
|
Building web pages from code |
|
|
196 | (7) |
|
Deleting elements from a document |
|
|
201 | (2) |
|
|
203 | (3) |
|
|
206 | (34) |
|
|
208 | (29) |
|
Give information to functions |
|
|
213 | (3) |
|
|
216 | (2) |
|
Multiple parameters in a function |
|
|
218 | (1) |
|
Using references as function arguments |
|
|
219 | (2) |
|
|
221 | (1) |
|
Returning values from function calls |
|
|
222 | (5) |
|
Add error handling to an application |
|
|
227 | (6) |
|
Local variables in JavaScript functions |
|
|
233 | (4) |
|
|
237 | (3) |
|
|
240 | (34) |
|
|
242 | (29) |
|
|
243 | (3) |
|
|
246 | (3) |
|
Processing data in an array |
|
|
249 | (3) |
|
|
252 | (13) |
|
|
265 | (3) |
|
Creating fixed with layouts |
|
|
268 | (3) |
|
|
271 | (3) |
|
|
274 | (48) |
|
|
276 | (19) |
|
|
277 | (1) |
|
|
278 | (1) |
|
|
279 | (2) |
|
|
281 | (2) |
|
|
283 | (2) |
|
|
285 | (1) |
|
|
285 | (2) |
|
|
287 | (1) |
|
Use an object to store contact details |
|
|
288 | (3) |
|
Use an object in the Tiny Contacts program |
|
|
291 | (1) |
|
Store data in JavaScript local storage |
|
|
292 | (3) |
|
Use JSON to encode object data |
|
|
295 | (5) |
|
|
300 | (4) |
|
|
304 | (5) |
|
|
305 | (3) |
|
Build a data object from a schema |
|
|
308 | (1) |
|
Improving the user interface |
|
|
309 | (7) |
|
Add "Super Search" to Tiny Contacts |
|
|
310 | (6) |
|
|
316 | (6) |
|
|
|
|
322 | (44) |
|
Manage errors with exceptions |
|
|
324 | (11) |
|
|
327 | (8) |
|
|
335 | (28) |
|
|
335 | (6) |
|
|
341 | (6) |
|
Store data in a class hierarchy |
|
|
347 | (1) |
|
Add a method to give an object a behavior |
|
|
348 | (2) |
|
Overriding methods in subclasses |
|
|
350 | (2) |
|
|
352 | (3) |
|
|
355 | (2) |
|
|
357 | (5) |
|
Exploring the Fashion Shop application |
|
|
362 | (1) |
|
|
363 | (3) |
|
|
366 | (42) |
|
|
368 | (11) |
|
|
368 | (2) |
|
Fashion Shop data analysis |
|
|
370 | (1) |
|
|
371 | (8) |
|
|
379 | (8) |
|
|
380 | (7) |
|
|
387 | (14) |
|
Create a web server with Node.js |
|
|
389 | (12) |
|
|
401 | (1) |
|
Deploying a Node.js server |
|
|
401 | (1) |
|
|
401 | (7) |
|
|
408 | (62) |
|
|
410 | (17) |
|
|
413 | (1) |
|
|
414 | (5) |
|
|
419 | (8) |
|
|
427 | (2) |
|
|
429 | (7) |
|
|
429 | (2) |
|
Control object position with a keyboard |
|
|
431 | (2) |
|
Use keydown and keyup events |
|
|
433 | (3) |
|
|
436 | (24) |
|
|
436 | (3) |
|
|
439 | (2) |
|
|
441 | (2) |
|
|
443 | (4) |
|
|
447 | (2) |
|
|
449 | (1) |
|
|
450 | (2) |
|
|
452 | (1) |
|
|
453 | (3) |
|
|
456 | (3) |
|
|
459 | (1) |
|
|
460 | (6) |
|
|
461 | (2) |
|
|
463 | (3) |
|
|
466 | (4) |
Index |
|
470 | |