diff --git a/chapter13/eventloop-async.js b/chapter13/eventloop-async.js new file mode 100644 index 0000000..19f97fe --- /dev/null +++ b/chapter13/eventloop-async.js @@ -0,0 +1,7 @@ +console.log("Hi there"); +setTimeout(() => console.log("Sorry I'm late"), 1000); +console.log(add(4,5)); + +function add(x, y) { + return x + y; +} \ No newline at end of file diff --git a/chapter13/eventloop-sync.js b/chapter13/eventloop-sync.js new file mode 100644 index 0000000..f904d71 --- /dev/null +++ b/chapter13/eventloop-sync.js @@ -0,0 +1,6 @@ +console.log("Hi there"); +add(4,5); + +function add(x, y) { + return x + y; +} \ No newline at end of file diff --git a/chapter14/bouncing ball b/chapter14/bouncing ball new file mode 100644 index 0000000..546f857 --- /dev/null +++ b/chapter14/bouncing ball @@ -0,0 +1,46 @@ + + + + + Canvas HTML5 + + + + +
+ + + + diff --git a/chapter14/canvas image uploader b/chapter14/canvas image uploader new file mode 100644 index 0000000..0d1c08c --- /dev/null +++ b/chapter14/canvas image uploader @@ -0,0 +1,43 @@ + + + + + Canvas HTML5 + + + + +
+ +
+
+ + + + diff --git a/chapter14/canvas rectangle b/chapter14/canvas rectangle new file mode 100644 index 0000000..4f5e1cd --- /dev/null +++ b/chapter14/canvas rectangle @@ -0,0 +1,27 @@ + + + + + Canvas HTML5 + + + + + Not Supported + + + + diff --git a/chapter14/canvas stickman b/chapter14/canvas stickman new file mode 100644 index 0000000..159bd3e --- /dev/null +++ b/chapter14/canvas stickman @@ -0,0 +1,54 @@ + + + + + Canvas HTML5 + + + + + Not Supported + diff --git a/chapter14/canvas text b/chapter14/canvas text new file mode 100644 index 0000000..442965a --- /dev/null +++ b/chapter14/canvas text @@ -0,0 +1,32 @@ + + + + + Canvas HTML5 + + + + + Not Supported + + + + diff --git a/chapter14/ch14-browser-supporting-file-reader.html b/chapter14/ch14-browser-supporting-file-reader.html new file mode 100755 index 0000000..b7c63a0 --- /dev/null +++ b/chapter14/ch14-browser-supporting-file-reader.html @@ -0,0 +1,13 @@ + + +
+ + + diff --git a/chapter14/ch14-canvas-animation.html b/chapter14/ch14-canvas-animation.html new file mode 100755 index 0000000..d40f0eb --- /dev/null +++ b/chapter14/ch14-canvas-animation.html @@ -0,0 +1,42 @@ + + + + + + + + + + diff --git a/chapter14/ch14-canvas-circle.html b/chapter14/ch14-canvas-circle.html new file mode 100755 index 0000000..64ce4d7 --- /dev/null +++ b/chapter14/ch14-canvas-circle.html @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/chapter14/ch14-canvas-draw-mouse.html b/chapter14/ch14-canvas-draw-mouse.html new file mode 100755 index 0000000..7a622cb --- /dev/null +++ b/chapter14/ch14-canvas-draw-mouse.html @@ -0,0 +1,63 @@ + + + + + + + +
+ + + + + diff --git a/chapter14/ch14-canvas-drawing-canvas.html b/chapter14/ch14-canvas-drawing-canvas.html new file mode 100755 index 0000000..81a1b5d --- /dev/null +++ b/chapter14/ch14-canvas-drawing-canvas.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/chapter14/ch14-canvas-lines.html b/chapter14/ch14-canvas-lines.html new file mode 100755 index 0000000..cee95f5 --- /dev/null +++ b/chapter14/ch14-canvas-lines.html @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/chapter14/ch14-canvas-save-image.html b/chapter14/ch14-canvas-save-image.html new file mode 100755 index 0000000..27d7f2a --- /dev/null +++ b/chapter14/ch14-canvas-save-image.html @@ -0,0 +1,34 @@ + + + + + + +
+ + + + diff --git a/chapter14/ch14-canvas-saving-image.html b/chapter14/ch14-canvas-saving-image.html new file mode 100755 index 0000000..1aad4c2 --- /dev/null +++ b/chapter14/ch14-canvas-saving-image.html @@ -0,0 +1,38 @@ + + + + + + + +
+ + + + + diff --git a/chapter14/ch14-canvas-text.html b/chapter14/ch14-canvas-text.html new file mode 100755 index 0000000..75a9952 --- /dev/null +++ b/chapter14/ch14-canvas-text.html @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/chapter9/ch9.js b/chapter14/ch14-canvas-upload-image.html old mode 100755 new mode 100644 similarity index 100% rename from chapter9/ch9.js rename to chapter14/ch14-canvas-upload-image.html diff --git a/chapter14/ch14-canvas.html b/chapter14/ch14-canvas.html new file mode 100755 index 0000000..68cca19 --- /dev/null +++ b/chapter14/ch14-canvas.html @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/chapter14/ch14-drawing-image.html b/chapter14/ch14-drawing-image.html new file mode 100755 index 0000000..0c49e2f --- /dev/null +++ b/chapter14/ch14-drawing-image.html @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/chapter14/ch14-geo-getlocation.html b/chapter14/ch14-geo-getlocation.html new file mode 100755 index 0000000..d1f221c --- /dev/null +++ b/chapter14/ch14-geo-getlocation.html @@ -0,0 +1,15 @@ + + + + + diff --git a/chapter14/ch14-inspect-geo.html b/chapter14/ch14-inspect-geo.html new file mode 100755 index 0000000..27e4c8d --- /dev/null +++ b/chapter14/ch14-inspect-geo.html @@ -0,0 +1,11 @@ + + + + + diff --git a/chapter14/ch14-localstorage.html b/chapter14/ch14-localstorage.html new file mode 100755 index 0000000..e760139 --- /dev/null +++ b/chapter14/ch14-localstorage.html @@ -0,0 +1,14 @@ + + +
+ + + diff --git a/chapter14/ch14-media.html b/chapter14/ch14-media.html new file mode 100755 index 0000000..b1215d8 --- /dev/null +++ b/chapter14/ch14-media.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/chapter14/ch14-reading-file.html b/chapter14/ch14-reading-file.html new file mode 100755 index 0000000..55aca2f --- /dev/null +++ b/chapter14/ch14-reading-file.html @@ -0,0 +1,17 @@ + + + +
+ + + diff --git a/chapter14/ch14-upload-file.html b/chapter14/ch14-upload-file.html new file mode 100755 index 0000000..92ed0e3 --- /dev/null +++ b/chapter14/ch14-upload-file.html @@ -0,0 +1,14 @@ + + + +
+ + + diff --git a/chapter14/ch14-upload-files.html b/chapter14/ch14-upload-files.html new file mode 100755 index 0000000..783477e --- /dev/null +++ b/chapter14/ch14-upload-files.html @@ -0,0 +1,15 @@ + + + +
+ + + diff --git a/chapter14/ch14.js b/chapter14/ch14.js new file mode 100755 index 0000000..7fa387a --- /dev/null +++ b/chapter14/ch14.js @@ -0,0 +1,6 @@ +let varContainingFunction = function () { + let varInFunction = "I'm in a function."; + console.log("hi there!"); +}; + +varContainingFunction(); diff --git a/chapter14/countdown timer b/chapter14/countdown timer new file mode 100644 index 0000000..25556ed --- /dev/null +++ b/chapter14/countdown timer @@ -0,0 +1,101 @@ + + + + + JavaScript + + + + +
+ +
0 Days 0 Hours 0 Minutes 0 Seconds +
+
+ + + + diff --git a/chapter14/draw on canvas b/chapter14/draw on canvas new file mode 100644 index 0000000..8bcf0c1 --- /dev/null +++ b/chapter14/draw on canvas @@ -0,0 +1,91 @@ + + + + + Canvas HTML5 + + + + + +
+ + + Color: + Width: +
+
+ + + + diff --git a/chapter14/ex1 Image Thumbnails b/chapter14/ex1 Image Thumbnails new file mode 100644 index 0000000..4808498 --- /dev/null +++ b/chapter14/ex1 Image Thumbnails @@ -0,0 +1,37 @@ + + + + +     Complete JavaScript Course + + + + + +
+ + + + diff --git a/chapter14/ex1 Image preview b/chapter14/ex1 Image preview new file mode 100644 index 0000000..4808498 --- /dev/null +++ b/chapter14/ex1 Image preview @@ -0,0 +1,37 @@ + + + + +     Complete JavaScript Course + + + + + +
+ + + + diff --git a/chapter14/flower.jpg b/chapter14/flower.jpg new file mode 100644 index 0000000..a70e2b4 Binary files /dev/null and b/chapter14/flower.jpg differ diff --git a/chapter14/matrix effect b/chapter14/matrix effect new file mode 100644 index 0000000..786e146 --- /dev/null +++ b/chapter14/matrix effect @@ -0,0 +1,44 @@ + + + + + Canvas HTML5 + + + + + + +
+ + + + diff --git a/chapter14/task List b/chapter14/task List new file mode 100644 index 0000000..91d44dc --- /dev/null +++ b/chapter14/task List @@ -0,0 +1,79 @@ + + + + JavaScript + + + +
+ + +
+ + + + diff --git a/chapter15/ch15-ajax.html b/chapter15/ch15-ajax.html new file mode 100755 index 0000000..ef90287 --- /dev/null +++ b/chapter15/ch15-ajax.html @@ -0,0 +1,22 @@ + + + +
+

AJAX in action!

+ +
+ + + diff --git a/chapter15/ch15-example-json.json b/chapter15/ch15-example-json.json new file mode 100755 index 0000000..c7928fc --- /dev/null +++ b/chapter15/ch15-example-json.json @@ -0,0 +1,13 @@ +{ + "name": "Malika", + "age": 50, + "profession": "programmer", + "languages": ["JavaScript", "C#", "Python"], + "address": { + "street": "Some street", + "number": 123, + "zipcode": "3850AA", + "city": "Utrecht", + "country": "The Netherlands" + } +} diff --git a/chapter15/ch15-express.js b/chapter15/ch15-express.js new file mode 100755 index 0000000..e13267f --- /dev/null +++ b/chapter15/ch15-express.js @@ -0,0 +1,10 @@ +const express = require('express'); +const app = express(); + +app.get('/', (request, response) => { + response.send('Hello Express!'); +}); + +app.listen(3000, () => { + console.log('Express app at http://localhost:3000'); +}); \ No newline at end of file diff --git a/chapter15/ch15-jquery.html b/chapter15/ch15-jquery.html new file mode 100755 index 0000000..da80efc --- /dev/null +++ b/chapter15/ch15-jquery.html @@ -0,0 +1,22 @@ + + + + + +

Let's play a game!

+

Of hide and seek...

+

I'm easy to find!

+ + + + + diff --git a/chapter15/ch15-node.js b/chapter15/ch15-node.js new file mode 100755 index 0000000..1f09738 --- /dev/null +++ b/chapter15/ch15-node.js @@ -0,0 +1,11 @@ +const http = require('http'); + +http.createServer(function(req, res){ + res.writeHead(200, {'Content-Type': 'text/html'}); //header status code + let name = 'maaike'; + res.write(`Finally, hello ${name}`); //body + res.end(); +}).listen(5000); //listen to port 8080 + +console.log('Listening on port 8080...'); + diff --git a/chapter15/ch15-vue-component.html b/chapter15/ch15-vue-component.html new file mode 100755 index 0000000..b126e3b --- /dev/null +++ b/chapter15/ch15-vue-component.html @@ -0,0 +1,18 @@ + + + + + +
+ +
+ + + + diff --git a/chapter15/ch15-vue.html b/chapter15/ch15-vue.html new file mode 100755 index 0000000..e2ce949 --- /dev/null +++ b/chapter15/ch15-vue.html @@ -0,0 +1,23 @@ + + + + + +
+

+ Let's play hide and seek.
+ Go to the console and type:
+ obj._data.hide = true
+

+
+ + + + \ No newline at end of file diff --git a/chapter15/exampled3.html b/chapter15/exampled3.html new file mode 100644 index 0000000..4ca9b65 --- /dev/null +++ b/chapter15/exampled3.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/chapter15/examplereact.html b/chapter15/examplereact.html new file mode 100644 index 0000000..0c98e73 --- /dev/null +++ b/chapter15/examplereact.html @@ -0,0 +1,20 @@ + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/chapter15/exampleunderscore.html b/chapter15/exampleunderscore.html new file mode 100644 index 0000000..d5c5e65 --- /dev/null +++ b/chapter15/exampleunderscore.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/chapter9/ch9-accessing.html b/chapter9/ch9-accessing.html index 0310f1e..63d2975 100755 --- a/chapter9/ch9-accessing.html +++ b/chapter9/ch9-accessing.html @@ -5,4 +5,7 @@
Hi!
Hi!
+ diff --git a/chapter9/ch9-domflow.html b/chapter9/ch9-domflow.html index 152eaba..065706e 100755 --- a/chapter9/ch9-domflow.html +++ b/chapter9/ch9-domflow.html @@ -26,7 +26,7 @@ } let divs = document.getElementsByTagName("div"); for (let i = 0; i < divs.length; i++) { - divs[i].addEventListener("click", bup, true); + divs[i].addEventListener("click", bup); }