From 77671ff1e3fc3e67a45a4879276600c63df4f53e Mon Sep 17 00:00:00 2001 From: David Oudenaarden Date: Thu, 6 Oct 2022 12:21:10 +0200 Subject: [PATCH] Fix folder structure --- Chapter 05/Code Samples/ch5_while.js | 1 - Chapter 10/Code Samples/ch10-accessing.html | 11 +++++ Chapter 10/Code Samples/ch10-attributes.html | 26 +++++++++++ Chapter 10/Code Samples/ch10-classes.html | 27 +++++++++++ Chapter 10/Code Samples/ch10-classes2.html | 23 ++++++++++ Chapter 10/Code Samples/ch10-classes3.html | 23 ++++++++++ Chapter 10/Code Samples/ch10-click.html | 23 ++++++++++ Chapter 10/Code Samples/ch10-colors.html | 27 +++++++++++ Chapter 10/Code Samples/ch10-domflow.html | 33 +++++++++++++ .../Code Samples/ch10-event-listener.html | 16 +++++++ Chapter 10/Code Samples/ch10-new-element.html | 12 +++++ .../Code Samples/ch10-selectionelements.html | 8 ++++ Chapter 10/Code Samples/ch10-this.html | 10 ++++ .../Code Samples/ch10-toggle-visibility.html | 16 +++++++ Chapter 10/Code Samples/ch10-treasure.html | 19 ++++++++ Chapter 11/Code Samples/ch11-animate.html | 30 ++++++++++++ Chapter 11/Code Samples/ch11-dragdrop.html | 46 +++++++++++++++++++ Chapter 11/Code Samples/ch11-eventtarget.html | 10 ++++ Chapter 11/Code Samples/ch11-formcontent.html | 21 +++++++++ Chapter 11/Code Samples/ch11-formsubmit.html | 8 ++++ .../Code Samples/ch11-formsubmitreturn.html | 33 +++++++++++++ Chapter 11/Code Samples/ch11-keyevent.html | 23 ++++++++++ .../Code Samples/ch11-keyeventreturn.html | 23 ++++++++++ Chapter 11/Code Samples/ch11-mouseevents.html | 11 +++++ .../Code Samples/ch11-mouseevents2.html | 20 ++++++++ .../Code Samples/ch11-onchang-onblur.html | 29 ++++++++++++ .../Code Samples/ch11-specifyingevents.html | 13 ++++++ errata.md | 22 --------- 28 files changed, 541 insertions(+), 23 deletions(-) create mode 100755 Chapter 10/Code Samples/ch10-accessing.html create mode 100755 Chapter 10/Code Samples/ch10-attributes.html create mode 100755 Chapter 10/Code Samples/ch10-classes.html create mode 100755 Chapter 10/Code Samples/ch10-classes2.html create mode 100755 Chapter 10/Code Samples/ch10-classes3.html create mode 100755 Chapter 10/Code Samples/ch10-click.html create mode 100755 Chapter 10/Code Samples/ch10-colors.html create mode 100755 Chapter 10/Code Samples/ch10-domflow.html create mode 100755 Chapter 10/Code Samples/ch10-event-listener.html create mode 100755 Chapter 10/Code Samples/ch10-new-element.html create mode 100755 Chapter 10/Code Samples/ch10-selectionelements.html create mode 100755 Chapter 10/Code Samples/ch10-this.html create mode 100755 Chapter 10/Code Samples/ch10-toggle-visibility.html create mode 100755 Chapter 10/Code Samples/ch10-treasure.html create mode 100755 Chapter 11/Code Samples/ch11-animate.html create mode 100755 Chapter 11/Code Samples/ch11-dragdrop.html create mode 100755 Chapter 11/Code Samples/ch11-eventtarget.html create mode 100755 Chapter 11/Code Samples/ch11-formcontent.html create mode 100755 Chapter 11/Code Samples/ch11-formsubmit.html create mode 100755 Chapter 11/Code Samples/ch11-formsubmitreturn.html create mode 100755 Chapter 11/Code Samples/ch11-keyevent.html create mode 100755 Chapter 11/Code Samples/ch11-keyeventreturn.html create mode 100755 Chapter 11/Code Samples/ch11-mouseevents.html create mode 100755 Chapter 11/Code Samples/ch11-mouseevents2.html create mode 100755 Chapter 11/Code Samples/ch11-onchang-onblur.html create mode 100755 Chapter 11/Code Samples/ch11-specifyingevents.html diff --git a/Chapter 05/Code Samples/ch5_while.js b/Chapter 05/Code Samples/ch5_while.js index 7d3103e..c37ff76 100755 --- a/Chapter 05/Code Samples/ch5_while.js +++ b/Chapter 05/Code Samples/ch5_while.js @@ -11,7 +11,6 @@ while (notFound && someArray.length > 0) { if (someArray[0] === "Louiza") { console.log("Found her!"); notFound = false; - console.log("false"); } else { someArray.shift(); } diff --git a/Chapter 10/Code Samples/ch10-accessing.html b/Chapter 10/Code Samples/ch10-accessing.html new file mode 100755 index 0000000..63d2975 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-accessing.html @@ -0,0 +1,11 @@ + + +

Just an example

+
Hi!
+
Hi!
+
Hi!
+ + + diff --git a/Chapter 10/Code Samples/ch10-attributes.html b/Chapter 10/Code Samples/ch10-attributes.html new file mode 100755 index 0000000..98a94fc --- /dev/null +++ b/Chapter 10/Code Samples/ch10-attributes.html @@ -0,0 +1,26 @@ + + + + +
+ + + + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-classes.html b/Chapter 10/Code Samples/ch10-classes.html new file mode 100755 index 0000000..fda8be4 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-classes.html @@ -0,0 +1,27 @@ + + + + +
+ + + + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-classes2.html b/Chapter 10/Code Samples/ch10-classes2.html new file mode 100755 index 0000000..8c60154 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-classes2.html @@ -0,0 +1,23 @@ + + + + +
+ + + + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-classes3.html b/Chapter 10/Code Samples/ch10-classes3.html new file mode 100755 index 0000000..dc9b15f --- /dev/null +++ b/Chapter 10/Code Samples/ch10-classes3.html @@ -0,0 +1,23 @@ + + + + +
+ + + + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-click.html b/Chapter 10/Code Samples/ch10-click.html new file mode 100755 index 0000000..884e935 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-click.html @@ -0,0 +1,23 @@ + + + + +
Don't click here!
+ + diff --git a/Chapter 10/Code Samples/ch10-colors.html b/Chapter 10/Code Samples/ch10-colors.html new file mode 100755 index 0000000..71bd8e4 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-colors.html @@ -0,0 +1,27 @@ + + + + +
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-domflow.html b/Chapter 10/Code Samples/ch10-domflow.html new file mode 100755 index 0000000..065706e --- /dev/null +++ b/Chapter 10/Code Samples/ch10-domflow.html @@ -0,0 +1,33 @@ + + + +
Bubbling events
+
+ 1 +
+ 2 +
+ 3 +
+ 4 +
5
+
+
+
+
+ + + diff --git a/Chapter 10/Code Samples/ch10-event-listener.html b/Chapter 10/Code Samples/ch10-event-listener.html new file mode 100755 index 0000000..a92835b --- /dev/null +++ b/Chapter 10/Code Samples/ch10-event-listener.html @@ -0,0 +1,16 @@ + + + +
Click for magic
+ + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-new-element.html b/Chapter 10/Code Samples/ch10-new-element.html new file mode 100755 index 0000000..1563be8 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-new-element.html @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-selectionelements.html b/Chapter 10/Code Samples/ch10-selectionelements.html new file mode 100755 index 0000000..9ea0f82 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-selectionelements.html @@ -0,0 +1,8 @@ + + +

Welcome page

+

+ Hi! +

+ + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-this.html b/Chapter 10/Code Samples/ch10-this.html new file mode 100755 index 0000000..dd981f7 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-this.html @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-toggle-visibility.html b/Chapter 10/Code Samples/ch10-toggle-visibility.html new file mode 100755 index 0000000..c5e9e83 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-toggle-visibility.html @@ -0,0 +1,16 @@ + + + +

I might disappear and appear.

+ + + \ No newline at end of file diff --git a/Chapter 10/Code Samples/ch10-treasure.html b/Chapter 10/Code Samples/ch10-treasure.html new file mode 100755 index 0000000..0e62cf1 --- /dev/null +++ b/Chapter 10/Code Samples/ch10-treasure.html @@ -0,0 +1,19 @@ + + +

Let's find the treasure

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/Chapter 11/Code Samples/ch11-animate.html b/Chapter 11/Code Samples/ch11-animate.html new file mode 100755 index 0000000..0d9a6fc --- /dev/null +++ b/Chapter 11/Code Samples/ch11-animate.html @@ -0,0 +1,30 @@ + + + + +
+ + + + diff --git a/Chapter 11/Code Samples/ch11-dragdrop.html b/Chapter 11/Code Samples/ch11-dragdrop.html new file mode 100755 index 0000000..7ab766c --- /dev/null +++ b/Chapter 11/Code Samples/ch11-dragdrop.html @@ -0,0 +1,46 @@ + + + + + + +
+ 1 +
+ Drag Me Please! +
+
+
2
+ + + diff --git a/Chapter 11/Code Samples/ch11-eventtarget.html b/Chapter 11/Code Samples/ch11-eventtarget.html new file mode 100755 index 0000000..3c48b7a --- /dev/null +++ b/Chapter 11/Code Samples/ch11-eventtarget.html @@ -0,0 +1,10 @@ + + + + + + diff --git a/Chapter 11/Code Samples/ch11-formcontent.html b/Chapter 11/Code Samples/ch11-formcontent.html new file mode 100755 index 0000000..774a4e6 --- /dev/null +++ b/Chapter 11/Code Samples/ch11-formcontent.html @@ -0,0 +1,21 @@ + + +
Hi there!
+
+ + + +
+ + + diff --git a/Chapter 11/Code Samples/ch11-formsubmit.html b/Chapter 11/Code Samples/ch11-formsubmit.html new file mode 100755 index 0000000..e48855f --- /dev/null +++ b/Chapter 11/Code Samples/ch11-formsubmit.html @@ -0,0 +1,8 @@ + + +
+ + +
+ + diff --git a/Chapter 11/Code Samples/ch11-formsubmitreturn.html b/Chapter 11/Code Samples/ch11-formsubmitreturn.html new file mode 100755 index 0000000..c3697dd --- /dev/null +++ b/Chapter 11/Code Samples/ch11-formsubmitreturn.html @@ -0,0 +1,33 @@ + + +
+
+ + + + +
+ + + diff --git a/Chapter 11/Code Samples/ch11-keyevent.html b/Chapter 11/Code Samples/ch11-keyevent.html new file mode 100755 index 0000000..0e01b27 --- /dev/null +++ b/Chapter 11/Code Samples/ch11-keyevent.html @@ -0,0 +1,23 @@ + + + +
JavaScript is fun!
+ + + + + \ No newline at end of file diff --git a/Chapter 11/Code Samples/ch11-keyeventreturn.html b/Chapter 11/Code Samples/ch11-keyeventreturn.html new file mode 100755 index 0000000..cb9771f --- /dev/null +++ b/Chapter 11/Code Samples/ch11-keyeventreturn.html @@ -0,0 +1,23 @@ + + + +
JavaScript is fun!
+ + + + + \ No newline at end of file diff --git a/Chapter 11/Code Samples/ch11-mouseevents.html b/Chapter 11/Code Samples/ch11-mouseevents.html new file mode 100755 index 0000000..8cacf4c --- /dev/null +++ b/Chapter 11/Code Samples/ch11-mouseevents.html @@ -0,0 +1,11 @@ + + + +
+ + + diff --git a/Chapter 11/Code Samples/ch11-mouseevents2.html b/Chapter 11/Code Samples/ch11-mouseevents2.html new file mode 100755 index 0000000..00c8df0 --- /dev/null +++ b/Chapter 11/Code Samples/ch11-mouseevents2.html @@ -0,0 +1,20 @@ + + + +
+ + + diff --git a/Chapter 11/Code Samples/ch11-onchang-onblur.html b/Chapter 11/Code Samples/ch11-onchang-onblur.html new file mode 100755 index 0000000..f3977e0 --- /dev/null +++ b/Chapter 11/Code Samples/ch11-onchang-onblur.html @@ -0,0 +1,29 @@ + + +
Hi there!
+
+ + + +
+ + + diff --git a/Chapter 11/Code Samples/ch11-specifyingevents.html b/Chapter 11/Code Samples/ch11-specifyingevents.html new file mode 100755 index 0000000..8e3cc0c --- /dev/null +++ b/Chapter 11/Code Samples/ch11-specifyingevents.html @@ -0,0 +1,13 @@ + + + +

Click here for magic!

+ + + + diff --git a/errata.md b/errata.md index a91cf4c..10b82b6 100644 --- a/errata.md +++ b/errata.md @@ -25,25 +25,3 @@ if(hobby = "coding"){ ## Chapter 14, Page 379 - Replaced `Exercise 14.4` with correct solution Solution for [Exercise 14.4](https://github.com/PacktPublishing/JavaScript-from-Beginner-to-Professional/blob/main/Chapter%2014/Exercise_14.4.html) is now fixed. - - -## Chapter 05, Page 89 - Added the missing `console.log` statement on line 8 to match the output -``` -while (notFound && someArray.length > 0) { - if (someArray[0] === "Louiza") { - console.log("Found her!"); - notFound = false; - console.log("false"); - } else { - someArray.shift(); - } -} -``` -## Chapter05, Page 112 - Rephrased the 2nd paragrah on the page. -"We are looking for all the groups that have two or more names starting with an M. If we find such a group, we will log it." - - -## Practice exercise 6.4, Page 129 - Fixed the incorrect referencing -Modify the calculator that you made in Practice exercise `6.2` -should be -Modify the calculator that you made in Practice exercise `6.4`