diff --git a/README.md b/README.md
index 11fcaa8b3..257c51c08 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,15 @@
>Please help us improve and share your feedback! If you find better tutorials or links, please share them by opening a Pull Request.
-# HackYourJavaScript
+# HackYourFuture JavaScript 1
-Here you can find course content and homework for the JavaScript 1,2 and 3 modules
+Here you can find course content and homework for the JavaScript 1 module
|Week|Topic|Read|Homework|
|----|-----|----|--------|
|0.|Preparation for your first JavaScript session|[Pre-reading](/Week0/README.md)|-|
|1.|Git Session with Unmesh|[Reading Week 1](/Week1/README.md) | [Homework Week 1](/Week1/MAKEME.md)|
-|2.|• Intro JavaScript (What is it, where can you use it for) • [Variables (var, let, const)](fundamentals/variables.md) • [Basic Data types (Strings, Numbers, Arrays, Booleans)](fundamentals/values.md) • [Operators](fundamentals/operators.md) • [Naming conventions](fundamentals/naming_conventions.md)|[Reading Week 2](/Week2/README.md)|[Homework Week 2](/Week2/MAKEME.md)|
-|3.|• Git work flow :smiling_imp: • [Advanced data types (objects)](fundamentals/objects.md) • [Conditional execution](fundamentals/conditional_execution.md) • [Statements vs Expressions](fundamentals/statements_expressions.md) • [Loops (for/while)](fundamentals/loops.md) • [Functions](fundamentals/functions.md) • [Scope](fundamentals/scope.md)|[Reading Week 3](/Week3/README.md)|[Homework Week 3](/Week3/MAKEME.md)|
-|4.|• Capturing user input • Events • [Basic DOM manipulations (img src, innerHTML)](fundamentals/DOM_manipulation.md) • Code debugging using the browser • [Code commenting](fundamentals/code_commenting.md) • Structuring code files • [Code formatting](fundamentals/code_formatting.md) |[Reading Week 4](/Week4/README.md)|[Homework Week 4](/Week4/MAKEME.md)|
-|5.|• Functions + JSON/Arrays • [Array Manipulations](fundamentals/array_manipulation.md) • JSON • [Map and filter](fundamentals/map_filter.md) • Arrow functions |[Reading Week 5](/Week5/README.md)|[Homework Week 5](/Week5/MAKEME.md)|
-|6.|• [Closures](fundamentals/scope_closures_this.md) • Callbacks|[Reading Week 6](/Week6/README.md)|[Homework Week 6](/Week6/MAKEME.md)|
-|7.|• [Object Oriented Programming and Classes](fundamentals/oop_classes.md) • [The `this` keyword](fundamentals/this.md) |[Reading Week 7](/Week7/README.md)|[Homework Week 7](/Week7/MAKEME.md)|
-|8.|• Structure for a basic SPA (Single Page Application) • [XMLHttpRequests](fundamentals/XMLHttpRequest.md) • API calls|[Reading Week 8](/Week8/README.md)|[Homework Week 8](/Week8/MAKEME.md)|
-|9.|• [Promises](fundamentals/promises.md) • (re)writing data structures (in JSON) • Async vs Sync • [Event Loop (order of execution)](fundamentals/event_loop.md) |[Reading Week 9](/Week9/README.md)|[Homework Week 9](/Week9/MAKEME.md)|
+|2.|• Intro JavaScript (What is it, where can you use it for) • [Variables (var, let, const)](../../../fundamentals/blob/master/fundamentals/variables.md) • [Basic Data types (Strings, Numbers, Arrays, Booleans)](../../../fundamentals/blob/master/fundamentals/values.md) • [Operators](../../../fundamentals/blob/master/fundamentals/operators.md) • [Naming conventions](../../../fundamentals/blob/master/fundamentals/naming_conventions.md)|[Reading Week 2](/Week2/README.md)|[Homework Week 2](/Week2/MAKEME.md)|
+|3.|• Git work flow :smiling_imp: • [Advanced data types (objects)](../../../fundamentals/blob/master/fundamentals/objects.md) • [Conditional execution](../../../fundamentals/blob/master/fundamentals/conditional_execution.md) • [Statements vs Expressions](../../../fundamentals/blob/master/fundamentals/statements_expressions.md) • [Loops (for/while)](../../../fundamentals/blob/master/fundamentals/loops.md) • [Functions](../../../fundamentals/blob/master/fundamentals/functions.md) • [Scope](../../../fundamentals/blob/master/fundamentals/scope.md)|[Reading Week 3](/Week3/README.md)|[Homework Week 3](/Week3/MAKEME.md)|
__Kind note:__
@@ -25,3 +19,4 @@ We expect you to __always__ come prepared to the class on Sunday.
A good understanding of all the above mentioned topics. Want to check your Knowledge? Go through the [JavaScript Fundamentals README](fundamentals/README.md) and research/ ask for help (Slack!) with the concepts that are not entirely clear.
+*The HackYourFuture curriculum is subject to CC BY copyright. This means you can freely use our materials, but just make sure to give us credit for it :)*
diff --git a/VSCodeTips/README.md b/VSCodeTips/README.md
deleted file mode 100644
index 8472f526d..000000000
--- a/VSCodeTips/README.md
+++ /dev/null
@@ -1,152 +0,0 @@
-# VSCode Tips
-
-Now that you're using VSCode here are some tips to use it effectively.
-
-## Installation
-
-Download and install the appropriate version of VSCode for your operating system from the [VSCode web site](https://code.visualstudio.com/).
-
-## Some useful extensions
-
-VSCode can be extended with _extensions_. There are two that we recommend you install from day 1.
-
-**Spell Checker**. We fully understand that you guys sometimes have difficulty with the correct English spelling when choosing names for variables and functions in your JavaScript programs. That is nothing to be ashamed of, but why not get some help from a handy extension?
-
-**ESLint**. This extension can check your JavaScript code for obvious errors, such as undefined variables, unused variables, etc.
-
-### Installation instructions
-
-1. Start up VSCode.
-
-2. Press the last button in the area in left margin (called the Activity Bar), shown below:
- 
-
-3. In the input field in the upper left corner, type `code spellchecker` as pictured here:
-
- 
-
-4. Press the green `install` button of **Code Spellchecker**.
-5. When the installation has finished, install the ESLint extension in a similar fashion:
-
- 
-
-6. When this second extension has finished installing you will notice that the green `install` button changes to a blue `reload` button. But no need to press this button at this time (no harm done if you did).
-7. You now need to install a global Node package to support ESLint. Open a terminal window in VSCode by selecting **View**, **Integrated Terminal** from the menu bar.
-8. A terminal window opens in the lower half of the VSCode window. In this window, type the command below (on Linux and MacOS systems you may need to prefix this command with `sudo`, e.g. `sudo npm ...`):
-
- ```
- npm install -g eslint
- ```
-
-
-9. Once the installation has finished close VSCode for now.
-
-## Customise VSCode Settings
-
-We recommend that you apply two changes to the default settings of VSCode to help you create well-formatted JavaScript code. Follow these steps:
-
-1. Press the cog-wheel icon in the lower-left corner of the VSCode screen, as indicated here:
-
- 
-
-2. From the menu, select **Settings**.
-3. In the `USER SETTINGS` tab in the right-hand half of the screen add the three lines indicated below between the curly braces:
-
-```json
-/// Place your settings in this file to overwrite the default settings
-{
- "editor.formatOnType": true,
- "editor.formatOnPaste": true,
- "editor.formatOnSave": true
-}
-```
-
-4. Close the User Settings tab.
-
-## Using VSCode for your homework
-
-You’ll get the most out of VSCode if you organise your work in folders, say a folder for each week in the JavaScript module.
-
-(Later in the course you will be “cloning” Git repositories into local folders as the basis for your homework or projects.)
-
-To start work with VSCode in particular folder, start VSCode and open the relevant folder: from the menu, select **File**, **Open Folder**. VSCode will now open this folder to be your "project folder", until you close VSCode or open another folder.
-
-Assuming that you will use the folder for JavaScript work, you need to create a special file inside of it as required by ESlint.
-
-From the menu, select **View**, **Command Palette…** and type `create` as show in the picture below. Select: **Create** '.eslintrc.json' File.
-
-
-
-The `.eslintrc.json` file will now be created in the project folder. No need to touch this file at this time, it just needs to sit in your project folder. Later in the course you may wish to add additional "rules" to this file for more stringent code checking.
-
-## Creating your JavaScript file
-
-You are now ready to start adding your first JavaScript file.
-
-1. From the menu, select **File**, **New File**. This will create a new, empty file named "Untitled-1".
-2. Select **File**, **Save** from the menu and give your file a an appropriate name. Make sure that you give it an extension ".js" to make it a JavaScript file.
-3. Start entering your JavaScript code in the new file. Be on the watch out for green squirly underlines. These are warnings from either ESLint or the Spell Checker that something might be wrong.
-4. If you see green squirly underlines, hover your mouse pointer over the underlined text and a tooltip will appear that explains what might be wrong.
-5. You can also open the "problem" panel by selecting **View**, **Problems** from the menu to see any problems identified.
-6. Pay attention also to the lower left part of the VSCode window, i.e. the status bar. It gives an indication of the number of errors and warnings issued. In the picture below there are zero errors, 7 warnings (usually from ESLint) and 14 informational messages (usually from the spell checker).
-
- 
-
-## Some useful short-cut commands
-
-In the previous section we frequently referred you to the menu bar to select commands. As you get more proficient with VSCode you may want to inspect these menus a little closer and take note of the short-cut commands listed in their right margin. For example, the short-cut command for **File**, **New** is listed as Ctrl+N (press `Ctrl` and `N` keys simultaneously) on a Windows or Linux PC and ⌘N on a Mac.
-
-Here are some short-cut commands that you will use many times a day and that we recommend you familiarise yourself with from day 1:
-
-| Operation | Windows | Mac | Linux |
-| --------- | ------- | ----- | ----- |
-| **Format Document** (make it pretty) | Shift‑Alt‑F | ⇧⌥F| Ctrl‑Shift‑I |
-| **Search** (Find)| Ctrl+F | ⌘F | Ctrl+F |
-| **Replace** (Find and replace) | Ctrl+H | ⌥⌘F | Ctrl+H |
-| **Rename Symbol** (change all names in file to a different name) | F2 | F2 | F2 |
-| Open an **Integrated Terminal** window in VSCode | Ctrl+' | ⌃\` | Ctrl+' |
-
-- **Format Document**. This command reformats your JavaScript file in a generally accepted standard format, using proper indenting, proper use of spaces, placing of curly braces and more. A neatly formatted document helps you to better understand your own code and your teachers, mentors and fellow students will love your for it too when they review your work.
-
- *With VSCode at your finger tips there is no longer any excuse for submitting poorly formatted homework!*
-
-- **Search**. Search for specified text.
-- **Replace**. Replace specified text by some other text.
-
- In the figure below the **Replace** pop-up window is shown. The **Search** pop-up is similar, but with one input field only.
-
- 
-
- - The `Aa` button activates the **Match Case** option.
- - The `Ab|` button matches **Whole Words Only**.
- - The `.*` button allow you to search using _regular expressions_, which you may encounter in later modules as an advanced JavaScript programming topic.
- - The `c-b` button next to the second input field replaces the next occurrence of the matched text.
- - The `ab-ac` button replaces **all** occurrences of the matched text.
- - The left and right arrows move the cursor to the previous and next match.
- - To get rid of the pop-up press `Esc` or press the `x` button.
-
-- **Rename Symbol**. This command renames all occurrences of a JavaScript variable or function name. To do so, move the text cursor to the variable or function name and press F2. A small pop-up window will appear in which you can type a new name. Press Enter to finalise the change or Esc to cancel it.
-
-- **Open an Integrated Terminal window**. We already covered this when we mentioned the **View**, **Integrated Terminal** menu command.
-
-## Running and debugging your code with the VSCode Node debugger
-
-If your JavaScript program is contained in a single file the easiest way to run and examine your code is the start straight in VSCode.
-
-1. Press the F5 function key to start the VSCode debugger.
-
-2. You will prompted to select an environment. Choose `Node.js` as show below.
-
- 
-
-This starts your program in the VSCode debugger.
-
-### Placing break points and inspecting variables
-
-This is covered in class.
-
-### Further information
-
-Please note that VSCode is actively being developed. At present there is a monthly release cycle, so don't be surprised when you are prompted once a month to update to the latest version. We advise you to update when prompted (naturally, not when you are in the middle something that you don't want interrupted).
-
-You can find detailed information about VSCode at the [VSCode web site](https://code.visualstudio.com/docs).
diff --git a/VSCodeTips/assets/27807986-f1f76762-6044-11e7-831d-dd2a6551f027.PNG b/VSCodeTips/assets/27807986-f1f76762-6044-11e7-831d-dd2a6551f027.PNG
deleted file mode 100644
index f6bb34e60..000000000
Binary files a/VSCodeTips/assets/27807986-f1f76762-6044-11e7-831d-dd2a6551f027.PNG and /dev/null differ
diff --git a/VSCodeTips/assets/27807987-f1fa8406-6044-11e7-8284-b51cd1251921.PNG b/VSCodeTips/assets/27807987-f1fa8406-6044-11e7-8284-b51cd1251921.PNG
deleted file mode 100644
index 407df8051..000000000
Binary files a/VSCodeTips/assets/27807987-f1fa8406-6044-11e7-8284-b51cd1251921.PNG and /dev/null differ
diff --git a/VSCodeTips/assets/27809404-94afa762-604f-11e7-9d77-0d590bfccc19.png b/VSCodeTips/assets/27809404-94afa762-604f-11e7-9d77-0d590bfccc19.png
deleted file mode 100644
index eab70baba..000000000
Binary files a/VSCodeTips/assets/27809404-94afa762-604f-11e7-9d77-0d590bfccc19.png and /dev/null differ
diff --git a/VSCodeTips/assets/27809813-64ae6c98-6053-11e7-8b6c-2bec3400ccd3.PNG b/VSCodeTips/assets/27809813-64ae6c98-6053-11e7-8b6c-2bec3400ccd3.PNG
deleted file mode 100644
index a5d9324dd..000000000
Binary files a/VSCodeTips/assets/27809813-64ae6c98-6053-11e7-8b6c-2bec3400ccd3.PNG and /dev/null differ
diff --git a/VSCodeTips/assets/27810425-592063d4-605a-11e7-9e29-dfb02f1aed22.png b/VSCodeTips/assets/27810425-592063d4-605a-11e7-9e29-dfb02f1aed22.png
deleted file mode 100644
index e2a193c6a..000000000
Binary files a/VSCodeTips/assets/27810425-592063d4-605a-11e7-9e29-dfb02f1aed22.png and /dev/null differ
diff --git a/VSCodeTips/assets/27833250-393c5a82-60d2-11e7-8713-648ec54abbed.png b/VSCodeTips/assets/27833250-393c5a82-60d2-11e7-8713-648ec54abbed.png
deleted file mode 100644
index 7afa7a8a8..000000000
Binary files a/VSCodeTips/assets/27833250-393c5a82-60d2-11e7-8713-648ec54abbed.png and /dev/null differ
diff --git a/VSCodeTips/assets/27833256-3d44da32-60d2-11e7-8f34-0bc0579a10c3.png b/VSCodeTips/assets/27833256-3d44da32-60d2-11e7-8f34-0bc0579a10c3.png
deleted file mode 100644
index 6018dcb0c..000000000
Binary files a/VSCodeTips/assets/27833256-3d44da32-60d2-11e7-8f34-0bc0579a10c3.png and /dev/null differ
diff --git a/VSCodeTips/assets/27833921-189a16f4-60d5-11e7-87ee-996cf97921ac.png b/VSCodeTips/assets/27833921-189a16f4-60d5-11e7-87ee-996cf97921ac.png
deleted file mode 100644
index d6c6cb770..000000000
Binary files a/VSCodeTips/assets/27833921-189a16f4-60d5-11e7-87ee-996cf97921ac.png and /dev/null differ
diff --git a/VSCodeTips/assets/27857540-5db15d4a-6172-11e7-953f-347c592b4e4f.png b/VSCodeTips/assets/27857540-5db15d4a-6172-11e7-953f-347c592b4e4f.png
deleted file mode 100644
index 01747d7c9..000000000
Binary files a/VSCodeTips/assets/27857540-5db15d4a-6172-11e7-953f-347c592b4e4f.png and /dev/null differ
diff --git a/VSCodeTips/assets/debug-1.png b/VSCodeTips/assets/debug-1.png
deleted file mode 100644
index 5da551363..000000000
Binary files a/VSCodeTips/assets/debug-1.png and /dev/null differ
diff --git a/VSCodeTips/assets/debug-2.png b/VSCodeTips/assets/debug-2.png
deleted file mode 100644
index 86ca4aae7..000000000
Binary files a/VSCodeTips/assets/debug-2.png and /dev/null differ
diff --git a/VSCodeTips/assets/debug-3.png b/VSCodeTips/assets/debug-3.png
deleted file mode 100644
index 103e2e664..000000000
Binary files a/VSCodeTips/assets/debug-3.png and /dev/null differ
diff --git a/VSCodeTips/assets/settings.png b/VSCodeTips/assets/settings.png
deleted file mode 100644
index fabaf868a..000000000
Binary files a/VSCodeTips/assets/settings.png and /dev/null differ
diff --git a/Week1/README.md b/Week1/README.md
index 79b5e30bc..2d7757675 100644
--- a/Week1/README.md
+++ b/Week1/README.md
@@ -36,10 +36,10 @@ Only watch the below chapters:
:star: You can also already go through the topics of the upcoming lecture. :star:
- Intro JavaScript (What is it, where can you use it for)
-- [Variables (var, let, const)](../fundamentals/variables.md)
-- [Basic Data types (Strings, Numbers, Arrays, Booleans)](../fundamentals/values.md)
-- [Operators](../fundamentals/operators.md)
-- [Naming conventions](../fundamentals/naming_conventions.md)
+- [Variables (var, let, const)](./../../../../fundamentals/blob/master/fundamentals/variables.md)
+- [Basic Data types (Strings, Numbers, Arrays, Booleans)](./../../../../fundamentals/blob/master/fundamentals/values.md)
+- [Operators](./../../../../fundamentals/blob/master/fundamentals/operators.md)
+- [Naming conventions](./../../../../fundamentals/blob/master/fundamentals/naming_conventions.md)
_Please go through the material and come to class prepared!_
diff --git a/Week2/MAKEME.md b/Week2/MAKEME.md
index 62cd4e05e..775f0af13 100644
--- a/Week2/MAKEME.md
+++ b/Week2/MAKEME.md
@@ -170,7 +170,7 @@ If you solve the FreeCodeCamp challenges and they are new concepts to you and yo
:star: Additional resources and review: :star:
-- [Variables](../fundamentals/variables.md)
-- [Basic value types](../fundamentals/values.md)
-- [Operators](../fundamentals/operators.md)
-- [Naming conventions](../fundamentals/naming_conventions.md)
+- [Variables](./../../../../fundamentals/blob/master/fundamentals/variables.md)
+- [Basic value types](./../../../../fundamentals/blob/master/fundamentals/values.md)
+- [Operators](./../../../../fundamentals/blob/master/fundamentals/operators.md)
+- [Naming conventions](./../../../../fundamentals/blob/master/fundamentals/naming_conventions.md)
diff --git a/Week2/README.md b/Week2/README.md
index d2c736fd6..12b122352 100644
--- a/Week2/README.md
+++ b/Week2/README.md
@@ -38,9 +38,9 @@ Please watch the following parts of the course, [Programming Foundations Fundame
Review the topics of week 2:
-- [Variables](../fundamentals/variables.md)
-- [Values](../fundamentals/values.md)
-- [Operators](../fundamentals/operators.md)
+- [Variables](./../../../../fundamentals/blob/master/fundamentals/variables.md)
+- [Values](./../../../../fundamentals/blob/master/fundamentals/values.md)
+- [Operators](./../../../../fundamentals/blob/master/fundamentals/operators.md)
- [Naming conventions](../fundamentals/naming_conventions.md)
_Please go through the material and come to class prepared!_
diff --git a/Week3/MAKEME.md b/Week3/MAKEME.md
index 2ea951464..0dfcec83c 100644
--- a/Week3/MAKEME.md
+++ b/Week3/MAKEME.md
@@ -23,19 +23,19 @@ Provide feedback to the homework of last week to one of your fellow students. Yo
- Have a look at [The Secret Life of JavaScript Primitives](https://javascriptweblog.wordpress.com/2010/09/27/the-secret-life-of-javascript-primitives/)
- Review the topics of last week:
- - [Variables](../fundamentals/variables.md)
- - [Values](../fundamentals/values.md)
- - [Operators](../fundamentals/operators.md)
- - [Naming conventions](../fundamentals/naming_conventions.md)
+ - [Variables](./../../../../fundamentals/blob/master/fundamentals/variables.md)
+ - [Values](./../../../../fundamentals/blob/master/fundamentals/values.md)
+ - [Operators](./../../../../fundamentals/blob/master/fundamentals/operators.md)
+ - [Naming conventions](./../../../../fundamentals/blob/master/fundamentals/naming_conventions.md)
- Go through the topics of this week:
- Git work flow
- - [Advanced data types (Objects)](../fundamentals/objects.md)
- - [Conditional execution](../fundamentals/conditional_execution.md)
- - [Statements vs Expressions](../fundamentals/statements_expressions.md)
- - [Loops (for/while)](../fundamentals/loops.md)
- - [Functions](../fundamentals/functions.md)
- - [Scope](../fundamentals/scope.md)
+ - [Advanced data types (Objects)](./../../../../fundamentals/blob/master/fundamentals/objects.md)
+ - [Conditional execution](./../../../../fundamentals/blob/master/fundamentals/conditional_execution.md)
+ - [Statements vs Expressions](./../../../../fundamentals/blob/master/fundamentals/statements_expressions.md)
+ - [Loops (for/while)](./../../../../fundamentals/blob/master/fundamentals/loops.md)
+ - [Functions](./../../../../fundamentals/blob/master/fundamentals/functions.md)
+ - [Scope](./../../../../fundamentals/blob/master/fundamentals/scope.md)
## Step 2: Watch
diff --git a/Week3/README.md b/Week3/README.md
index eabee89af..d60d67497 100644
--- a/Week3/README.md
+++ b/Week3/README.md
@@ -24,32 +24,29 @@ Go through the topics of week 2-4.
### Week 2
-- [Variables (var, let, const)](../fundamentals/variables.md)
-- [Basic Data types (Strings, Numbers, Arrays, Booleans)](../fundamentals/values.md)
-- [Operators](../fundamentals/operators.md)
-- [Naming conventions](../fundamentals/naming_conventions.md)
+- [Variables (var, let, const)](./../../../../fundamentals/blob/master/fundamentals/variables.md)
+- [Basic Data types (Strings, Numbers, Arrays, Booleans)](./../../../../fundamentals/blob/master/fundamentals/values.md)
+- [Operators](./../../../../fundamentals/blob/master/fundamentals/operators.md)
+- [Naming conventions](./../../../../fundamentals/blob/master/fundamentals/naming_conventions.md)
### Week 3
-- [Advanced data types (objects)](../fundamentals/objects.md)
-- [Conditional execution](../fundamentals/conditional_execution.md)
-- [Statements vs Expressions](../fundamentals/statements_expressions.md)
-- [Loops (for/while)](../fundamentals/loops.md)
-- [Functions](../fundamentals/functions.md)
-- [Scope](../fundamentals/scope.md)
+- [Advanced data types (objects)](./../../../../fundamentals/blob/master/fundamentals/objects.md)
+- [Conditional execution](./../../../../fundamentals/blob/master/fundamentals/conditional_execution.md)
+- [Statements vs Expressions](./../../../../fundamentals/blob/master/fundamentals/statements_expressions.md)
+- [Loops (for/while)](./../../../../fundamentals/blob/master/fundamentals/loops.md)
+- [Functions](./../../../../fundamentals/blob/master/fundamentals/functions.md)
+- [Scope](./../../../../fundamentals/blob/master/fundamentals/scope.md)
### Week 4
- Capturing user input
- Events
-- [Basic DOM manipulations (img src, innerHTML)](../fundamentals/DOM_manipulation.md)
+- [Basic DOM manipulations (img src, innerHTML)](./../../../../fundamentals/blob/master/fundamentals/DOM_manipulation.md)
- Code debugging using the browser
-- [Code commenting](../fundamentals/code_commenting.md)
+- [Code commenting](./../../../../fundamentals/blob/master/fundamentals/code_commenting.md)
- Structuring code files
-- [Code formatting](../fundamentals/code_formatting.md)
+- [Code formatting](./../../../../fundamentals/blob/master/fundamentals/code_formatting.md)
_Please go through the material and come to class prepared!_
-
-
-
diff --git a/Week4/MAKEME.md b/Week4/MAKEME.md
deleted file mode 100644
index d48b79e49..000000000
--- a/Week4/MAKEME.md
+++ /dev/null
@@ -1,130 +0,0 @@
-# Homework Week 4
-
-```
-Topics discussed in class this week:
-• Capturing user input
-• Basic DOM manipulations [img src, innerHTML]
-• Code debugging using the browser
-• Code commenting
-• Structuring code files
-• Scope
-• State
-```
-
->[Here](/Week3/README.md) you find the readings you have to complete before the fourth lecture.
-
-## Step 0: Make a small dance
-Give yourself (or your neighbor) a little tap on the shoulder, you've made it to JS2! :muscle:
-
-## Step 0: review
-
-Week 2
-
-- [Variables (var, let, const)](../fundamentals/variables.md)
-- [Basic Data types (Strings, Numbers, Arrays, Booleans)](../fundamentals/values.md)
-- [Operators](../fundamentals/operators.md)
-- [Naming conventions](../fundamentals/naming_conventions.md)
-
-Week 3
-
-- [Advanced data types (objects)](../fundamentals/objects.md)
-- [Conditional execution](../fundamentals/conditional_execution.md)
-- [Statements vs Expressions](../fundamentals/statements_expressions.md)
-- [Loops (for/while)](../fundamentals/loops.md)
-- [Functions](../fundamentals/functions.md)
-- [Scope](../fundamentals/scope.md)
-
-Week 4
-
-- Capturing user input
-- Events
-- [Basic DOM manipulations (img src, innerHTML)](../fundamentals/DOM_manipulation.md)
-- Code debugging using the browser
-- [Code commenting](../fundamentals/code_commenting.md)
-- Structuring code files
-- [Code formatting](../fundamentals/code_formatting.md)
-
-
-## Step 1: Implement feedback
-
-_Deadline Monday_
-
-Your fellow students have provided you with feedback in Trello.
-
-- Implement both feedback from Trello and Github.
-- Check on one of your fellow students code and issues and see if her or she implemented their feedback correctly. If there are some things that can be improved make an issue suggesting further improvements. If you think that the feedback has been implemented correctly create a issue saying something like: "nice work you can clear your issues".
-
-## Step 2: Reorganize your Github
-
-_Deadline Monday_
-
-Your Github should contain two repositories called `hyf-javascript1` and `hyf-javascript2`. Inside the JavaScript repositories you should have three folders, called week1, week2, and week3 (or something similar). Inside these folders you should have the different assignments (a file per exercises). Try and find proper names for the exercises that reflect somehow what is going on in the code. Avoid using spaces in your file names, this makes it harder to "run" you files. Also make sure that all your JavaScript files have a `.js` extension.
-
-## Step 3: Custom DOM manipulation challenge :mortar_board:
-
-_Deadline Saturday_
-
-1. Open a new js file and start by declaring an array that contains 10 strings. These strings should be of book titles you have read (or made up) and be lowercase without spaces or special characters so that you can use these later as Id's. (Example: Harry Potter's - The Chamber of Secrets -> `harry_potter_chamber_secrets`).
-
-2. Create a basic html file called index.html and use it to load the js file, confirm the console.log show the array. (This is for debugging and making sure everything is in order. Delete it later when you're done :))
-
-3. Make a function (or functions) that generate a `ul` with `li` elements for each book ID in the array using a for loop.
-
-4. Make an object containing information for each book. Each item (object) in this object should have the book ID you thought up in point 1 as a key, and it should have at least the following fields: title, language and author.
-
-5. Now change the function you used to display the book ID's in a list to take the actual information about the book from the object and display that. Make sure you choose the right html elements for each piece of info, for instance, a heading for the title.
-
-6. Beautify your html page with css, add sources and alts to each of the images.
-
-7. Download book covers for each book, construct a new Object which has as keys the bookId's again, and as value the path to the image source (e.g. `{"harry_potter_blabla": "./img/harry_potter_blabla.jpg", ...}`). Now loop over these entries (_hint: `Object.keys(objectName)` gives you an array containing the keys_). Then write a function which places an image at the corresponding `li` element. Remember that Objects are not ordered, so you cannot guarantee that the first key is the first `li` element. (_Hint: you could give each `li` item an `id` tag by modifying the function you made before_)
-
-```
-How to hand in your homework:
-• Upload your homework in your "hyf-javascript2" Github repository. Make sure to create a new folder "week1" first.
-• Upload your homework files inside the week1 folder and write a description for this “commit”.
-• Your hyf-javascript2/week1 should now contain an index.html, main.css and a script.js file (and the images folder)
-• Place the link to your repository folder in Trello.
-```
-
-## Step 4: **FreeCodeCamp challenges:**
-
-_Deadline Sunday morning_
-
-- https://www.freecodecamp.com/challenges/declare-javascript-objects-as-variables
-- https://www.freecodecamp.com/challenges/make-instances-of-objects-with-a-constructor-function
-- https://www.freecodecamp.com/challenges/make-unique-objects-by-passing-parameters-to-our-constructor
-- https://www.freecodecamp.com/challenges/make-object-properties-private
-
-
-And just for fun ... https://www.freecodecamp.com/challenges/sum-all-numbers-in-a-range
-
-## Step 5: Read before next lecture
-
-_Deadline Sunday morning_
-
-Go trough the reading material in the [README.md](/Week4/README.md) to prepare for your next class
-
-## :boom: Bonus homework :boom:
-the Bonus homework for this week (for those of you want an extra challenge) do the following:
-
-- Sign up on codewars.com
-- In you account setting under “clan” write “Hack Your Future”
-- Go do the challenges in the following playlist: https://www.codewars.com/collections/fun-fun-fundamentals
-
-Codewars is really a lot of fun, and you can compete against each other who has the most points :trollface:
-it’s a great way to really practice JavaScript a lot in various problems.
-
-Please note, there are various challenges all sorted on difficultly called KIU. Kiu 8 is the easiest, Kiu 1 is the hardest, we expect you to do challenges around level 8, 7 maybe.
-
-enjoy!
-
-:octocat:
-```
-How to hand in your homework:
-• Create a new repository "hyf-javascript2". Also create a new folder "week1" inside this repository.
-• Upload your homework files inside the week1 folder and write a description for this “commit”.
-• Your hyf-javascript2/week1 should now contain the files of your homework.
-• Place the link to your repository folder in Trello.
-```
-
-:star: Additional resources and review: [here](/Week3/REVIEW.md):star:
\ No newline at end of file
diff --git a/Week4/README.md b/Week4/README.md
deleted file mode 100644
index c17fee334..000000000
--- a/Week4/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-### Reading Week 4
-
-# Reading material for the fifth lecture:
-
-```
-In week five we will discuss the following topics:
-• Functions + JSON/Arrays
-• Array Manipulations
-• JSON
-• Map and filter
-• Arrow functions
-```
-
-### Here are resources that we like you to read as a preparation for the coming lecture.
-
-#### JSON
-- [JSON](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) (MDN)
-
-#### Map and Filter
-- :dizzy: [Fun fun functional](https://www.youtube.com/playlist?list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84) :dizzy: Check the first 3-4 videos.
-
-#### Code conventions
-- Code conventions: http://javascript.crockford.com/code.html
-
-#### Array cardio
-- Wes Bos' awesome free tutorials. Just make a free account and do Array Cardio #1 [here](https://javascript30.com/)
-
-#### More objects
-- Objects continued: http://eloquentjavascript.net/06_object.html
-
-
-### Refresher:
-Read your book ('A Smarter Way To Learn JavaScript')! If you don't do it on yourself, here's the chapters to read next for next week:
-*Note: If you already know the material you are reading just take a glance over it and don't use too much time. Just be sure that you get everything! You may have already read about it, or used it in the previous classes. Note that this also has 'catch up' material in it, about functions and objects. If you did not take the time to read your book yet about these things please do so!*
-
-* DOM (*may have known material, know how to select/search/append elements etc.!*):
-Chapters 58 - 68
-
-* Reading/setting input fields:
-Chapters 49 - 50
-
-* Functions (*if you think you need a bit more understanding of them read this*):
-Chapters 35 - 38
-
-* Objects (*important to really understand them, read this if you are unsure! You may also read chapters 72, 73 and 74 if you have time and want to learn more*):
-Chapters 70-71, 75
-
-_Please go through the material and come to class prepared!_
-
diff --git a/Week4/code_examples/Closures (class 10).md b/Week4/code_examples/Closures (class 10).md
deleted file mode 100644
index 6f9adc881..000000000
--- a/Week4/code_examples/Closures (class 10).md
+++ /dev/null
@@ -1,70 +0,0 @@
-# Closures
-
-Below is a stripped down, simplified version of the first closure example we used during the lecture.
-
-```js
-function greetPerson(name) {
- function innerFunction(greeting) {
- return greeting + ', ' + name;
- };
- return innerFunction;
-}
-
-const greetTimir = greetPerson('Timir');
-const timirGreeting = greetTimir('Good morning');
-console.log(timirGreeting);
-```
-
-## Description
-
-The `greetPerson` function (the "outer" function) contains an enclosed function, named `innerFunction`. This inner function has access to the `name` argument of its enclosing function `greetPerson`, as well as to its own `greeting` argument.
-
-When we later call `greetPerson` passing `'Timir'` as its parameter, the `greetPerson` function sets its `name` argument to `'Timir'` and returns its inner function. This inner function **retains access to the `name` argument** and its value `'Timir'`, even after `greetPerson` exits. (Note that `greetPerson` doesn't call its inner function; it just returns it.)
-
-The returned inner function is subsequently assigned to the variable `greetTimir`.
-
-> A closure is an inner function that has access to the outer (enclosing) function’s variables and arguments.
-
-With `greetTimir('Good morning')` we are effectively calling the inner function and passing it the string `'Good morning'`. Because the inner function still has access to `name` it can produce the output as printed by the `console.log`:
-
-```
-Good morning, Timir
-```
-
-## Alternative implementation
-
-We could have obtained the same result by scrapping all lines except the last two and replace them with an equivalent, custom made `greetTimir` function as shown below. We wouldn't be able to tell the difference from just looking at the output produced.
-
-```js
-function greetTimir(greeting) {
- const name = 'Timir';
- return greeting + ', ' + name;
-}
-
-const timirGreeting = greetTimir('Good morning');
-console.log(timirGreeting);
-```
-
-However, with that custom made `greetTimir` we can only greet Timir. In contrast, with `greetPerson` we can easily produce functions to greet any person we like (or don't like :wink:), e.g.:
-
-```js
-const greetMaartje = greetPerson('Maartje');
-const maartjeGreeting = greetMaartje('Hi there');
-console.log(maartjeGreeting);
-
-const greetHasan = greetPerson('Hasan');
-const hasanGreeting = greetHasan('Have a good day');
-console.log(hasanGreeting);
-```
-
-## Recommended further reading
-
-- [Eloquent JavaScript - Chapter 3: Functions](http://eloquentjavascript.net/03_functions.html)
- (Press Ctrl+F in your browser and search for the word 'closure')
-
-- [Understand JavaScript Closures With Ease](http://javascriptissexy.com/understand-javascript-closures-with-ease/)
-
-
-
-
-
diff --git a/Week4/code_examples/closure1.js b/Week4/code_examples/closure1.js
deleted file mode 100644
index 62963ffa1..000000000
--- a/Week4/code_examples/closure1.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-/**
- * Closure returning a function
- */
-function greetPerson(name) {
- const defaultGreeting = 'Hello';
- const innerFunction = function (greeting) {
- greeting = greeting || defaultGreeting;
- return greeting + ', ' + name;
- };
- return innerFunction;
-}
-
-const greetTimir = greetPerson('Timir');
-const timirGreeting = greetTimir('Good morning');
-console.log(timirGreeting);
-
-const greetMaartje = greetPerson('Maartje');
-const maartjeGreeting = greetMaartje('Hi there');
-console.log(maartjeGreeting);
-
diff --git a/Week4/code_examples/closure2.js b/Week4/code_examples/closure2.js
deleted file mode 100644
index 3324f2618..000000000
--- a/Week4/code_examples/closure2.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-/**
- * Closure returning an object
- */
-function someoneNamed(name) {
- var obj = {
- getName: function() {
- return name;
- },
- getNameUpper: function() {
- return name.toUpperCase();
- }
- };
- return obj;
-}
-
-var someOtherGuy = someoneNamed('Hasan');
-var thisGuy = someoneNamed("jim");
-console.log('Hey, ' + someOtherGuy.getName() + '... Are you there ' + someOtherGuy.getNameUpper() + '?');
diff --git a/Week4/code_examples/equal.js b/Week4/code_examples/equal.js
deleted file mode 100644
index 25bb07bc6..000000000
--- a/Week4/code_examples/equal.js
+++ /dev/null
@@ -1,43 +0,0 @@
-const obj1 = {
- a: '1',
- b: 'this is the letter b',
- f: {
- foo: 'what is a foo anyway',
- bar: [1, 5, '3', 4]
- }
-};
-
-const obj2 = {
- a: 1,
- b: 'this is the letter b',
- f: {
- foo: 'what is a foo anyway',
- bar: [1, 5, 3, 4]
- }
-};
-
-function equal(a, b, mode) {
- const eq = mode === 'strict' ? a === b : a == b;
- if (eq) {
- return true;
- }
-
- if (a && b &&
- typeof a === 'object' &&
- typeof b === 'object' &&
- Object.keys(a).length === Object.keys(b).length) {
-
- for (const key of Object.keys(a)) {
- if (!b.hasOwnProperty(key) || !equal(a[key], b[key], mode)) {
- return false;
- }
- }
-
- return true;
- }
-
- return false;
-};
-
-console.log('objects are equal: ' + equal(obj1, obj2));
-console.log('objects are strictly equal: ' + equal(obj1, obj2, 'strict'));
diff --git a/Week4/code_examples/object.js b/Week4/code_examples/object.js
deleted file mode 100644
index 986a850f6..000000000
--- a/Week4/code_examples/object.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// 'use strict';
-/**
- * An object with methods for use with `new`
- */
-function Person(name) {
- this.name = name || 'unknown';
-}
-
-Person.prototype.getName = function () {
- return this.name;
-};
-
-var someGuy = new Person('Jim');
-var anotherGuy = new Person('Hasan');
-console.log('Hi, ' + someGuy.getName());
diff --git a/Week5/MAKEME.md b/Week5/MAKEME.md
deleted file mode 100644
index baa6211ac..000000000
--- a/Week5/MAKEME.md
+++ /dev/null
@@ -1,133 +0,0 @@
-## Homework Week 5
-
-```
-Topics discussed this week:
-• Functions + JSON/Arrays
-• Array Manipulations
-• JSON
-• Map and filter
-• Arrow functions
-```
-
->[Here](/Week5/README.md) you find the readings you have to complete before the sixth lecture.
-
-## Step 1: Feedback
-
-_Deadline Monday_
-
-Go through the `html-css`, `javascript1` and `javascript2` Github repositories of one of your fellow students, check if they have neat repository's with the different weeks (eg. `week1`, `week2`, `week3`)of homework for all the modules up and until now. Also check if they have hosted their homework on Github pages. If there is anything that they can improve please provide feedback in an issue.
-
-## Step 2: More map, filter and `=>`
-
-_Deadline Wednesday_
-
-1. Say you would like to write a program that doubles the odd numbers in an array and throws away the even number.
-
- Your solution could be something like this:
- ```js
- let numbers = [1, 2, 3, 4];
- let newNumbers = [];
-
- for(let i = 0; i < numbers.length; i++) {
- if(numbers[i] % 2 !== 0) {
- newNumbers.push(numbers[i] * 2);
- }
- }
-
- console.log("The doubled numbers are", newNumbers); // [2, 6]
-
- ```
-
- Rewrite the above program using `map` and `filter` don't forget to use `=>`
-
-
-Underneath you see a very interesting small insight in Maartje's work:
-
-```js
-let monday = [
- {
- name : 'Write a summary HTML/CSS',
- duration : 180
- },
- {
- name : 'Some web development',
- duration : 120
- },
- {
- name : 'Fix homework for class10',
- duration : 20
- },
- {
- name : 'Talk to a lot of people',
- duration : 200
- }
- ];
-
-let tuesday = [
- {
- name : 'Keep writing summary',
- duration : 240
- },
- {
- name : 'Some more web development',
- duration : 180
- },
- {
- name : 'Staring out the window',
- duration : 10
- },
- {
- name : 'Talk to a lot of people',
- duration : 200
- },
- {
- name : 'Look at application assignments new students',
- duration : 40
- }
- ];
-
-let tasks = monday.concat(tuesday);
-```
-
-2. Write a program that does the following below. Use `map` and `filter`. You will also need a `forEach` or a `for` loop for the 'summing up' part.
-
-- Collect two days' worth of tasks.
-- Convert the task durations to hours, instead of minutes.
-- Filter out everything that took two hours or more (remove from the collection)
-- Multiply the each duration by a per-hour rate for billing (you can decide yourself what Maartje should make per hour) and sum it all up.
-- Output a formatted Euro amount.
-- Don't forget to use `=>`
-
-
-## Step 3: ROVER
-
-Finish up to chapter 7: JSON on [roverjs.com](http://roverjs.com/)!
-
-## Step 4: **Some freeCodeCamp challenges:**
-
-_Deadline Saturday_
-
-1. [Comparisons with the Logical And Operator](https://www.freecodecamp.com/challenges/comparisons-with-the-logical-and-operator)
-
-2. [Record Collection](https://www.freecodecamp.com/challenges/record-collection)
-
-3. [Iterate over Arrays with map](https://www.freecodecamp.com/challenges/iterate-over-arrays-with-map)
-
-
-## Step 5: Read before next lecture
-
-_Deadline Sunday morning_
-
-Go trough the reading material in the [README.md](/Week5/README.md) to prepare for your next class
-
-
-```
-How to hand in your homework:
-• Clone your existing "hyf-javascript2" Github repository.
-• Create a new folder "week2" USING THE COMMAND LINE
-• Save your homework files inside this folder.
-• When you are done with your homework use add/commit and push to upload your homework.
-• Write a description for your “commit”.
-• Your hyf-javascript2/week2 should now contain all your homework files.
-Place the link to your repository folder in Trello.
-```
diff --git a/Week5/README.md b/Week5/README.md
deleted file mode 100644
index 80961dcc2..000000000
--- a/Week5/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Reading material for the sixth lecture:
-
-```
-In week six we will discuss the following topics:
-• Closures
-• Scope
-• Callbacks
-```
-
-### Here are resources that we like you to read as a preparation for the coming lecture:
-
-#### Closures
-- [Closures](http://javascriptissexy.com/understand-javascript-closures-with-ease/)
-- [MDN Closures](https://developer.mozilla.org/en/docs/Web/JavaScript/Closures)
-
-#### Design patterns
-- [Learning JavaScript Design Patterns](https://addyosmani.com/resources/essentialjsdesignpatterns/book/#detailnamespacing) up to and including chapter 3
-
-_Please go through the material and come to class prepared!_
-
-
diff --git a/Week6/MAKEME.md b/Week6/MAKEME.md
deleted file mode 100644
index 3f35feda8..000000000
--- a/Week6/MAKEME.md
+++ /dev/null
@@ -1,166 +0,0 @@
-# Homework Week 6
-
-```
-Topics discussed this week:
-• Closures
-• Scope
-• Callbacks
-```
-
->[Here](/Week6/README.md) you find the readings you have to complete before the seventh lecture.
-
-## Step 1: Feedback
-
-_Deadline Monday_
-
-Give feedback on `step 2` of `week 5` to one of your fellow students (do this by creating issues in Github).
-
-## ~~Step 2: Git Homework~~
-
-~~_Deadline Saturday_~~
-
-~~[Make these assignments](https://github.com/HackYourFuture/Git/blob/master/Lecture-3.md). For handing in homework follow the Forking workflow that is described in our lecture-3.md file of HackYourFuture’s Git repository (there is also a video that explains this).~~
-
-## Step 3: Read
-
->Read:
-- JavaScript : [Closures](http://conceptf1.blogspot.nl/2013/11/javascript-closures.html)
-- Everything you wanted to know about [JavaScript scope](https://toddmotto.com/everything-you-wanted-to-know-about-javascript-scope/)
-- JavaScript [Scoping and Hoisting](http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html)
-- 5 JavaScript [“Bad” Parts That Are Fixed In ES6](https://medium.freecodecamp.com/5-javascript-bad-parts-that-are-fixed-in-es6-c7c45d44fd81)
-
-- More about [closures](https://www.reddit.com/r/learnjavascript/comments/1v6n8p/closure_explain_likei_am_in_high_school/?st=ixsp0mbe&sh=5526d150)
-- A VERY popular [StackOverflow article](http://stackoverflow.com/questions/111102/how-do-javascript-closures-work)
-
-## Step 4: JavaScript
-
-_Deadline Wednesday_
-
-0\. We learned a little bit about callbacks in JS. A callback is simply a function passed to another function that gets executed (run) after a potentially long running operation has completed. There is another function called `setTimeout` that will wait a specified period of time and then execute a function. For example:
-
-```js
-function doIt() {
- console.log('I am done');
-}
-setTimeout(doIt, 5000)
-```
-
->f you run the above code it will wait 5 seconds and print `I am done`. Please read something about setTimeout on MDN. The first argument to the `setTimeout` call is the callback (`doIt`)
-
-1\.We saw that we can pass functions as arguments to other functions. Your task is to write a function that takes another function as an argument and runs it.
-
-```js
-function foo(func) {
- // What to do here?
-}
-
-function bar() {
- console.log('Hello, I am bar!');
-}
-
-foo(bar);
-```
-
-
-
-
-
-2\. You must write a function that takes 4 arguments.
- - A start value
- - An end value
- - A callback to call if the number is divisible by 3
- - A callback to use if the number is divisible by 5
-
-The function should generate an array containing values from start value to end value (inclusive).
-
-Then the function should iterate over the array and call the first callback if the array value is divisible by 3
-
-The function should call the second callback if the array value is divisible by 5
-
-Both functions should be called if the array value is divisible by both 3 and 5
-
-```js
-THIS IS FAKE CODE
-function threeFive(startIndex, stopIndex, threeCallback, fiveCallback) {
- // make array
- // start at beginning of array and check if you should call threeCallback or fiveCallback or go on to next
-}
-threeFive(10, 15, sayThree, sayFive);
-
-// Should create an array [10,11,12,13,14,15]
-// and call sayFive, sayThree, sayThree, sayFive - please make sure you see why these calls are made before you start coding
-```
-
-
-3\. Please solve this problem using:
-https://www.freecodecamp.com/challenges/repeat-a-string-repeat-a-string
-3\.1 A for loop.
-3\.2 A while loop.
-3\.3 A do loop.
-
-4\. Some practice with objects
-https://www.freecodecamp.com/challenges/construct-javascript-objects-with-functions
-
-5\. Nested loops
-https://www.freecodecamp.com/challenges/nesting-for-loops
-
-6\. We did some work with arrays - `var arr = [1,2,3]`
-We can also nest arrays inside arrays like this `var arr2d = [[1,2], [3,4], [5,6]]` (for math people you can think of this as a matrix)
-How would you print all the items of an array with 3 dimensions?
-How about with K dimensions?
-What if you didn't know how deep the array was nested? (You don't have to write code for this but think about it)
-
-7\. Here are two functions that look like they do the something similar but they print different results. Please explain what's going on here.
-
-```js
-let x = 9;
-function f1(val) {
- val = val+1;
- return val;
-}
-f1(x);
-console.log(x);
-
-
-let y = { x: 9 };
-function f2(val) {
- val.x = val.x + 1;
- return val;
-}
-f2(y);
-console.log(y);
-```
-If you are confused please run the code and then consult the Google for "javaScript pass by value pass by reference"
-
-
-## Step 5: Scope and Closures
-
-_Deadline Saturday_
-
-> Let's continue to learn a little more about scope and Closures.
-
-
-1. Write a function that would allow you to do this:
-```js
-let addSix = createBase(6);
-addSix(10); // returns 16
-addSix(21); // returns 27
-```
-
-__Bonus__: Write a function takes this array `['a', 'b', 'c', 'd', 'a', 'e', 'f', 'c']` and returns an array which only has unique values in it (so it removes the duplicate ones). Make it a 'smart' algorithm that could do it for every array (only strings/number). Try to make it as fast as possible!
-
-
-## Step 6: Read before next lecture
-
-_Deadline Sunday morning_
-
-Go trough the reading material in the [README.md](/Week6/README.md) to prepare for your next class
-
-
-```
-How to hand in your homework:
-• Upload your homework in your "hyf-javascript2" Github repository. Make sure to create a new folder "week3" first.
-• Upload your homework files inside the week3 folder and write a description for this “commit”.
-• Your hyf-javascript2/week3 should now contain an index.html, main.css and a script.js file (and the images folder)
-• Place the link to your repository folder in Trello.
-```
diff --git a/Week6/README.md b/Week6/README.md
deleted file mode 100644
index ff5b5590c..000000000
--- a/Week6/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Reading material for the seventh lecture:
-
-```
-In week seven we will discuss the following topics:
-• (Object Oriented Programming)
- • this
- • call
- • apply
- • bind
-• Promises
-```
-
-### Here are resources that we like you to read as a preparation for the coming lecture:
-
-### `call` `apply`, `bind`
-- [Function.prototype.call()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call)
-- [Function.prototype.apply()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)
-- [Function.prototype.bind()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)
-
-#### Promises
-Some nice resources about promises :ring:
-- [Googles post about Promises](https://developers.google.com/web/fundamentals/getting-started/primers/promises)
-- [A nice article from David Walsh](https://davidwalsh.name/promises)
-- [A real life example](https://github.com/mdn/js-examples/blob/master/promises-test/index.html)
-- [stackoverflow](http://stackoverflow.com/questions/13343340/calling-an-asynchronous-function-within-a-for-loop-in-javascript)
-- [promises](https://www.youtube.com/watch?v=WBupia9oidU)
-
-_Please go through the material and come to class prepared!_
-
diff --git a/Week7/MAKEME.md b/Week7/MAKEME.md
deleted file mode 100644
index 0dc41ef89..000000000
--- a/Week7/MAKEME.md
+++ /dev/null
@@ -1,169 +0,0 @@
-# Homework Week 7
-
-```
-Topics discussed this week:
-• Object Oriented Programming
- • this
- • call
- • apply
- • bind
-• Code flow (order of execution)
-```
-
->[Here](/Week7/README.md) you find the readings you have to complete before the eighth lecture.
-
-## Step 1: Give feedback
-
-_Deadline Monday_
-
-Give feedback on Step 4 and 5 of last weeks homework. Please provide the feedback in an issue.
-
-## Step 2: Issues
-
-_Deadline Monday_
-
-- Solve all your Git issues. DO NO CLOSE AN ISSUE WITHOUT AN EXPLANATION OR CODE COMMIT REFERENCING THAT ISSUE.
-
-
-## Step 3: Fix issues
-
-_Deadline Thursday_
-
-- Fix the issues from the last weeks and make sure you explain how you fixed the issue in a comment (or commit message)
-
-## Step 4: Some Challenges
-
-_Deadline Saturday_
-
-Let's practice working with Objects and Arrays. Go to FreeCodeCamp and complete all challenges under "Object Oriented and Functional Programming" and the _first four challenges_ under "Basic Algorithm Scripting", up until 'Find the longest word in a string.'
-
-Also make:
-
-1. [Comparisons with the Logical And Operator](https://www.freecodecamp.com/challenges/comparisons-with-the-logical-and-operator)
-
-2. [Record Collection](https://www.freecodecamp.com/challenges/record-collection)
-
-3. [Iterate over Arrays with map](https://www.freecodecamp.com/challenges/iterate-over-arrays-with-map)
-
-## Step 5: OOP
-
-_Deadline Wednesday_
-
-Complete the following code:
-
-```js
-class Movie {
- constructor(title, director) {
- // add your code here
- }
-
- getTitle() {
- // add your code here
- }
-
- getDirector() {
- // add your code here
- }
-
- addStar(star) {
- // add your code here
- }
-
- getStars() {
- // add your code here
- }
-
- addWriter(writer) {
- // add your code here
- }
-
- getWriters() {
- // add your code here
- }
-
- addRating(rating) {
- // add your code here
- }
-
- getAverageRating() {
- // add your code here
- }
-
- // ... Add yours :-) Look to IMDB for inspiration
-}
-
-class StaffMember {
- constructor(name, role, dateOfBirth) {
- // add your code here
- }
-
- addMovie(movie) {
- // add your code here
- }
-
- getName() {
- // add your code here
- }
-
- getRole() {
- // add your code here
- }
-
- getAge() {
- // add your code here
- }
-}
-
-// Pick your favorite movie from http://www.imdb.com/
-
-const myMovie = new Movie(...);
-
-const firstActor = new StaffMember(...);
-myMovie.addStar(firstActor);
-// create and add more staff members
-
-// Make sure that the following actions work.
-console.log(myMovie.getStars().map(actor => `${actor.getName()} ${actor.getAge()}`));
-const director = myMovie.getDirector();
-console.log(`Director: ${director.getName()}`);
-```
-
-Fun extra step: If you get bored, template them and make a page by rendering the results in HTML :smile: with something like `document.querySelector('.move').innerHTML = ...`
-
-## Step 6: Read before next lecture
-
-_Deadline Sunday morning_
-
-Go trough the reading material in the [README.md](/Week7/README.md) to prepare for your next class
-
-## _BONUS_ : Code Kata Race
-
-If you haven't already join our clan: "Hack Your Future" in codewars
-
-Solve the following problems:
-- [Problem 1](https://www.codewars.com/kata/keep-up-the-hoop)
-- [Problem 2](https://www.codewars.com/kata/find-the-first-non-consecutive-number)
-- [Problem 3](https://www.codewars.com/kata/negation-of-a-value)
-- Some more [Homework](https://www.codewars.com/collections/hyf-homework-1)
-
-_Hints_
-- Hint for Q1: split your code into two parts, one part for the case that one of the two strings has an extra letter at the start or the end but is otherwise identical & one part for the case that the strings are the same length but one character is different in one of the strings
-- Also for Q1 this function on strings might be useful: [JavaScript String slice() method](https://www.w3schools.com/jsref/jsref_slice_string.asp)
-- Also potentially useful: [JavaScript String charAt() Method](https://www.w3schools.com/jsref/jsref_charat.asp)
-- [Hint for Q2](https://www.w3schools.com/jsref/jsref_sort.asp) Also there are no sample tests, you need to use submit
-
-Remember the person with the most kata points gets a prize from Gijs (and you can do exercises on this website without us assigning them - anything kyu 7 or kyu 8 you can try to do - kyu 6 or lower is probably too hard) -->
-
--[MORE BONUS](https://www.codewars.com/collections/hyf-homework-1-bonus-credit) :collision:
-
-## To watch before the next lecture:
-
-(watch in this order)
-
-1. [Stacks/Queues](https://www.youtube.com/watch?v=wjI1WNcIntg) (5 mins)
-2. [JS Event Loops](https://www.youtube.com/watch?v=8aGhZQkoFbQ) (26 mins, watch this one twice or until you understand it)
-
->Create a new repository "hyf-javascript3". Also create a new folder "week1" inside this repository.
-Upload your homework files inside the week1 folder and write a description for this “commit”.
-Your hyf-javascript3/week1 should now contain the files of your homework.
-Place the link to your repository folder in Trello.
diff --git a/Week7/README.md b/Week7/README.md
deleted file mode 100644
index b9d653bd6..000000000
--- a/Week7/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Reading material for the eight lecture:
-
-```
-In week eight we will discuss the following topics:
-• Structure for a basic SPA
-• XMLHttpRequests
-• API calls
-```
-
-### Here are resources that we like you to read as a preparation for the coming lecture:
-
-#### APIs
-- Read about APIS: https://www.programmableweb.com/api-university/what-are-apis-and-how-do-they-work
-
-#### XMLHttpRequests
-- XMLHttpRequests: https://www.kirupa.com/html5/making_http_requests_js.htm
diff --git a/Week8/MAKEME.md b/Week8/MAKEME.md
deleted file mode 100644
index 7698dc9f9..000000000
--- a/Week8/MAKEME.md
+++ /dev/null
@@ -1,103 +0,0 @@
-# Homework Week 8
-
-```
-Topics discussed this week:
-• Structure for a basic SPA
-• XMLHttpRequests
-• API calls
-```
-
-
->[Here](/Week8/README.md) you find the readings you have to complete before the ninth lecture.
-
-## Step 1: Feedback
-
-_Deadline Monday_
-
-Please provide feedback in an issue.
-
-_Deadline Monday_
-
-## Step 2: FINISH ALL YOUR JAVASCRIPT HOMEWORK
-
-_Deadline Saturday_
-
-:point_up:
-
-## Step 3: SPA :sweat_drops:
-
-_Deadline Saturday_
-
-You are going to write a SPA (Single Page Application) that uses the [Github API](https://developer.github.com/guides/getting-started/). Make sure that your app uses a logical pattern just like [this codepen](http://codepen.io/Razpudding/pen/MmVpeW).
-
-Just like last week:
-
-Make a website that fetches (= to get) data asynchronously.
-
-1) Create a new website with external js file
-
-2) Add a button (e.g. 'click me') that when clicked `console.logs` 'you clicked me!'
-
-3) Create a function that fetches from [The Github API](https://developer.github.com/v3/). For example from [this page] (https://api.github.com/orgs/HackYourFuture/repos). For help on this check this [SO post](https://stackoverflow.com/questions/247483/http-get-request-in-javascript)
-
-4) Display the data that you get from the Github API on your web page.
-
-5) Now link the two together: When you click the button -> get the data from the Github API and display it on your website
-
-Cool we are back where we left of.
-
-6) Take a look at this:
-
-```js
-https://api.github.com/repos/HackYourFuture/CommandLine
-```
-
-7) Make a function which takes a single argument. The function should make an XHR request to `https://api.github.com/repos/HackYourFuture/[SearchTerm]` where the search term will be the argument. This argument will be the input the user has given you, so make sure that when the user clicks the button you call this function with the argument.
-
-8) Make all the repositories link their own page in Github. Use the value of the key: `name` to make this work (hint: Github urls always look like this https://api.github.com/repos/HackYourFuture/[repositoryName] where [repositoryName] would be replaced by the actual `name` of the repository, for example `CommandLine`). Make sure the link opens in a new tab.
-
-- Make sure you handle user input well. That means you need to think about empty input, and input that doesn't yield any results.
-
-So Github has this really nice documentation :octocat: :
-Check these out for example
-https://developer.github.com/v3/repos/collaborators/
-https://developer.github.com/v3/repos/commits/
-
-9) Extend your page with an input element. This is so the user will be able to type in text.
-
-10) For each repository, show (in the right column) who the contributers are. You will need to use the `contributors_url` for this.
-
-!Important
-- Do not duplicate code! This is especially important for making requests since we are making multiple ones with different urls and we want to do different actions based on the call we are making. Here are some handles to get you started:
- - So write a function called `makeRequest` which accepts (at least) the following parameters: `url` and `callback`.
- - Make sure your `callback` is called when the request errors or when it sends a response (look at the documentation)
- - Your `callback` functions should accept two parameters so it can handle both errors: `err` and `response`.
- So based on your users actions (input, hovering, clicking) you want to call `makeRequest` with a different `url` and supply it with a function that handles both errors (display an error message to the user for example) and responses (render it correctly, as described below).
- - Make your functions small and reusable (modular)! That means create separate functions to handle certain steps.
-
-11) GO WILD
-
-Again, check out the Github API documentation to see what kind of magic stuff you can do with it.
-
-The assignment is to implement something extra that is not in the assignment :scream: (nice and vague right?)
-
-So for example, we have teams in our organization. You can find out who are in there and make a call to 'https://api.github.com/users/' + userInput (where userInput is a string typed into a search field by a user). You can show the users name, avatar image (not the link to the image!) and the number of public repos they have. Or you could make an API call to 'https://api.github.com/users/user/repos' to find out the public repo's they have. Or you can show how many people starred a specific repository.
-
-Anyway, endless fun and possibilities. Need inspiration, check out the Github API documentation. Oh and please make it look nice (hint: use the stuff you learned in HTML/CSS)!
-
-
-_BONUS_ : Code Kata Race
-
-- [Codewars](https://www.codewars.com/collections/hyf-homework-number-2)
-
-
-## Step 5: Read before next lecture
-
-_Deadline Sunday morning_
-
-Go trough the reading material in the [README.md](/Week8/README.md) to prepare for your next class
-
->Upload your homework in your "hyf-javascript3" Github repository. Make sure to create a new folder "week2" first.
-Upload your homework files inside the week2 folder and write a description for this “commit”.
-Your hyf-javascript3/week2 should now contain all your homework files.
-Place the link to your repository folder in Trello.
\ No newline at end of file
diff --git a/Week8/README.md b/Week8/README.md
deleted file mode 100644
index 86809dc82..000000000
--- a/Week8/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Reading material for the ninth lecture:
-
-```
-In week nine we will discuss the following topics:
-• (re)writing data structures (in JSON)
-• Async VS Sync
-• Code flow (order of execution)
-```
-
-### Here are resources that we like you to read as a preparation for the coming lecture:
-
-#### Async VS Sync
-- Read about Asynchronous vs. Synchronous programming: http://www.hongkiat.com/blog/synchronous-asynchronous-javascript/
-
-#### Closures and async code
-- [Why closures are helpful with async code](http://stackoverflow.com/questions/13343340/calling-an-asynchronous-function-within-a-for-loop-in-javascript)
-
-_Please go through the material and come to class prepared!_
-
-
diff --git a/Week9/MAKEME.md b/Week9/MAKEME.md
deleted file mode 100644
index 7f8e1e2e8..000000000
--- a/Week9/MAKEME.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# Homework Week 9
-
-```
-Topics discussed this week:
-• (re)writing data structures (in JSON)
-• Async VS Sync
-• Code flow (order of execution)
-```
-
-## Step 1: Read
-
-- If you need to refresh your memory on es6 classes: [es6-classes-in-depth](https://ponyfoo.com/articles/es6-classes-in-depth)
-- Also read this article on scopes & closures: [explaining-javascript-scope-and-closures](https://robertnyman.com/2008/10/09/explaining-javascript-scope-and-closures/)
-
-## Step 2: Feedback
-
-- Create at least 2 issues (bug / feature / code improvement) on another teams github repository. Do this in pairs.
-- Solve the issue proposed by another students in your github repo. More info [here](https://hackyourfuture.slack.com/files/michahell/F31BX1XT6/Merging_a_local_branch_into_master)
-
-## Step 3: Pair programming promises challenge
-
-This week you will work in a team!
-
-So please:
-
-- (one of your team mates should) Fork this repository: https://github.com/HackYourFuture/PromisessObjectsAndStringRendering
-- make sure you are all collaborators on the same repository
-- Follow the instructions in the REAME.md of the above repository
-- To hand in your homework you make a PR to the existing repository
-
-## Step 4: Async challenge
-
-_Deadline Saturday_
-
-1. Rewrite the code below to Async:
-
-```js
-1.
-
-let sum = calculateSum(2, 6);
-console.log(sum);
-
-2.
-
-let results = $.getJSON('http://myapi.com');
-showResults(results);
-
-3.
-
-let sum = calculateSum(2, 6);
-if (sum > 8) {
- console.log('larger than 8');
-}
-
-4.
-
-let data = $.getJSON('http://myapi.com');
-data = data.map(function (x) { return x * 8; });
-
-writeDataToFile(data);
-```
-
-## Step 5: Read before next lecture
-
-_Deadline Sunday morning_
-
-Go trough the reading material in the [README.md](/Week9/README.md) to prepare for your next class
-
-> To hand in your homework, make a pull request to the original repository you forked from. Remember, our master branches are protected, you cannot push to a directly cloned repository you first have to make a fork to your own Github.
diff --git a/Week9/README.md b/Week9/README.md
deleted file mode 100644
index 41154847a..000000000
--- a/Week9/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Reading material for your first Node lecture:
-
-```
-Next week you will start with Node
-```
-
-### Refresher
-:star: Timir wrote a really nice javaScript REVIEW that explains which concepts are most important to know in JavaScript when you continue your coding journey to Node, this is a __MUST__ read: [Timir's JavaScript Review](/fundamentals/javascript_review.md) :star:
-
-- https://forum.freecodecamp.com/t/javascript-callback-functions/14658/2
-http://www.learn-js.org/en/Callbacks
-
-## Check out how to prepare for your first Node lecture here:
-
-- https://github.com/HackYourFuture/Node.js/blob/master/week0/README.md
-
-_Please go through the material and come to class prepared!_
-
-
-
-
-
diff --git a/fundamentals/CLI.md b/fundamentals/CLI.md
deleted file mode 100644
index 94db7b106..000000000
--- a/fundamentals/CLI.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# CLI
-
-## Most used commands
-
-| Command | Description |
-| ------- | ----------- |
-| `pwd` | present working directory |
-| `ls` | List files in the directory |
-| `cd` | change the directory |
-| `touch` | Create an empty file |
-| `echo` | display the string |
-| `echo -n` | Display the string without newline |
-| `echo “something” > file` | Redirect the output of echo and create file |
-| `echo “another thing” >> file` | Append the string to the file |
-| `mkdir` | make a new directory |
-| `cd ~` | home |
-| `cd -` | previous directory |
-| `cd ..` | parent directory |
-| `ls -a` | List all files including hidden files |
-| `cd /` | change to the root directory |
-| `cat` | Concatenate the file line by line and display it on the terminal |
-| `less` | Print the big file line by line |
-| `vim ` | open the editor with {`a:` to go to the insert mode, `:wq` to write and quit } |
-| `for var in {START..END}; do ; ;..; ; done` | |
-| `head ` | display the first 10 lines of file |
-| `tail ` | display the last 10 lines of file |
-| `head -n ` | display first n lines of file |
-| `tail -n ` | display last n lines of file |
-| `man ` | Display manual of the COMMAND |
diff --git a/fundamentals/DOM_manipulation.md b/fundamentals/DOM_manipulation.md
deleted file mode 100644
index 60bc8a2dd..000000000
--- a/fundamentals/DOM_manipulation.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Basic DOM manipulations
-
-Using JavaScript we can access and manipulate the Document Object Model (DOM). We access the DOM through a global object called `document`.
-
-HTML
-```html
-
-
-
-```
-
-A common method to access the DOM is by giving a HTML element an ID, and then using the `document` method `getElementById()`
-
-```js
-const x = document.getElementById('hello');
-```
-
-Now we have stored a *reference* of how that HTML element is accessed through the DOM object. We can use this to manipulate the element.
-
-```js
-x.innerHTML = 'hello';
-```
-
-We can also create elements
-```js
-const a = document.createElement('li');
-x.appendChild(a);
-```
-
-We can set attributes on elements
- ```js
- a.setAttribute('id', 'hackyourfuture');
- ```
-
- We can add event listeners to elements:
-
- ```js
- turnLeftButton.addEventListener('click', function () {
- turn('left');
-});
- ```
-
diff --git a/fundamentals/README.md b/fundamentals/README.md
deleted file mode 100644
index c0a4d51e7..000000000
--- a/fundamentals/README.md
+++ /dev/null
@@ -1,268 +0,0 @@
-# Understanding JavaScript fundamentals
-
-When talking about JavaScript, it is important that you use the correct terminology. This way, if you talk about code with others, they'll understand what you mean without any ambiguity.
-
-## Variables
-
-A "variable" is a place where you can store information, such as a string, or a number.
-
-### Variable declaration
-
-Variables are "declared" using the `let` and `const` keywords (or the older `var` keyword):
-
-```js
-let x = 5;
-```
-
-Here, we say: "declare variable x and initialize it with the number 5".
-
-### Variable types
-
-All variables have a type. In our example above, the variable `x` is a `number`. JavaScript supports the following types:
-
-* `string`, e.g. "HackYourFuture"
-* `number`, e.g. 5, or 10.6
-* `boolean`, e.g. `true` or `false`
-* `array`\*, e.g. `[1, 2, 3]` or `['what', 'is', 'your', 'name']`
-* `object`, e.g. `{name: 'John', age: 24}`, or the special object `null`
-* `function`, e.g. `function () { return 4; }`
-* `symbol`
-
-In addition, a variable may be `undefined`. This is also a special type.
-
-To get the type of a variable, use the following code:
-
-```js
-let x = 5;
-let typeOfX = typeof x; // -> "number"
-```
-
-Note that I've put an asterisk behind 'array'. That is because in JavaScript, array is a special kind of object:
-
-```js
-let arr = [1, 2, 3];
-let typeOfArr = typeof arr; // -> "object"
-```
-
-However, in our communication, we will call these variables arrays.
-
-### Null & undefined
-
-The values `null` and `undefined` are very similar in JavaScript, but they behave a bit differently. The difference is that `null` always has type "object", and `undefined` always has type "undefined".
-
-Whenever you declare a variable, but you don't set a value, the variable will become `undefined`. JavaScript will never make a variable `null` unless you explicitly program it.
-
-```js
-let x;
-console.log(typeof x); // -> "undefined"
-```
-
-
-## Arrays
-
-Variables that are arrays contain a list of things, instead of just one thing. What's inside the array, we typically call "elements". So, the array `[1, 2, 3]` has three elements. The array `[]` has no elements and is therefore empty. The number of elements in an array is called its "length".
-
-When you want to access an element inside an array, you use an "index". This is the number that you put between brackets (`[]`).
-
-Given the following code:
-
-```js
-let arr = ['john', 'jane', 'jack'];
-console.log(arr[0]);
-```
-
-The number `0` is the "index of the first element of array `arr`". Conversely, the element "at index 0 in array `arr` is `'john'`".
-
-Instead of a number, you can also use a variable to access elements in an array, *as long as this variable is a number*:
-
-```js
-let arr = ['john', 'jane', 'jack'];
-let a = 1;
-console.log(arr[a]); // -> jane
-```
-
-If the index you use is not an integer (a whole number), or if it's less than `0` or if it's greater than or equal to the array's length, you will get back `undefined`.
-
-
-
-## Objects
-
-Variables that are objects also contain a list of things, but instead of them being in some specific order, they can be assigned to words, called "keys". Instead of "elements" the things that are inside objects are called "properties".
-
-
-```js
-let obj = {name: 'John', age: 24};
-```
-
-This object has two properties: `name` and `age`. The "value" of the property `name` is the string `'John'`. The "value" of the property `age` is the number `24`.
-
-When accessing object properties, you can use the dot-notation: `obj.name` or the bracket-notation: `obj["name"]`. Note that the latter looks a lot like the way to access array elements. However, here what's inside the bracket (called "key" for objects, instead of "index") must be a string.
-
-```js
-console.log(obj.name); // -> 'John'
-console.log(obj['name']); // -> 'John'
-```
-
-Just like with arrays, you can also use a variable to access properties, as long as these variables are strings. In this case you cannot use the dot-notation!
-
-```js
-let ageKey = 'age';
-console.log(obj[ageKey]); // -> 24
-```
-
-Remember that there is a very big difference between `obj[name]` and `obj["name"]`.
-
-> Note:
->
-> Thinking back of arrays, the length of an array can be retrieved by `arr.length`. So as mentioned before, arrays are just like other JavaScript objects. You could even write `arr['length']` to access the `length` property of the array. JavaScript will look: is what we put between brackets a number? Then it is an index and we'll look up the correct array element. If it's a string, it's a key and we will look up the corresponding property.
-
-
-## Functions
-
-A function is a reusable piece of code. Functions are *very* important in JavaScript, to the extent that some people call JavaScript a "function-oriented" language. As mentioned above, variables can be of type function. In fact, *every function is a variable*.
-
-The following two pieces of code have the exact same result:
-
-```js
-function sum(a, b) {
- return a + b;
-}
-```
-
-and
-
-```js
-let sum = function (a, b) {
- return a + b;
-}
-```
-
-> Note
->
-> This is not entirely true, as in the second code, the function is "anonymous", i.e. it has no name. But in both cases, you can call the function like this: `sum(4, 5)`.
-
-### Parameters & arguments
-
-When writing `function sum(a, b)`, `a` and `b` are the "parameters" of the function. We say that this function has two parameters. (Sometimes, you'll see the word "arity": this function has "arity" 2, but that is something you don't have to use for now.)
-
-Now, when *calling* function sum, e.g. `let s = sum(4, 5);`, we say that the numbers `4` and `5` are the "arguments" of the function. Arguments are "passed" to the function: "we pass `4` and `5` to the function `sum`".
-
-So remember the difference between the word "parameter" and "argument". Many people confuse them, and that's not a big problem, but understanding the difference is always nice:
-
-* A parameter is the name you want to give to the variable that is available inside of the function.
-* An argument is the actual value you want to assign to the parameters when you call the function.
-
-A function that "has two parameters" is also said to "take/accept two arguments". But, sometimes you'll hear people say: "the function has two arguments" or "the function takes two parameters". While formally incorrect, you'll know what they mean.
-
-### Calling a function on something
-
-In JavaScript, you can call functions *on* something. By this, we mean that you use the dot to call the function. For instance, when we say "call method `trim` on string `s`", we mean:
-
-```js
-let s = " this is a string ";
-s.trim(); // -> "this is a string"
-```
-
-> Note
->
-> Technically, this means that the string `s` will become the `this` special variable inside of the function.
-
-However, there are functions that you don't call on anything:
-
-```js
-function sum(a, b) { return a + b; }
-sum(4, 5); // -> 9
-```
-
-Here, you call the function `sum` on nothing.
-
-Most built-in functions in JavaScript, like math functions or logging functions, also use the dot:
-
-```js
-Math.round(4.5);
-console.log("hello");
-Array.from([1, 2, 3]);
-```
-
-Indeed, these functions are also called "on" `Math`, `console`, `Array`, and so on. However, in this case, their purpose is more to group them logically, so here it's not very important to use that terminology. We'd rather say: "call the function `Math.round` with `4.5` as an argument", i.e. we include it in the full name of the methods.
-
-It's more when you think about which functions you can call "on" your own variables (strings, arrays, numbers, etc):
-
-```js
-myString.trim();
-myArray.slice();
-myNumber.toString();
-...
-```
-
-
-## Statements & expressions
-
-Most programming languages that you'll encounter in real life are called "imperative" programming languages. JavaScript is such an imperative programming language. Imperative is another word for command-like. That is, you give the computer a bunch of commands after each other. First do this, then do that, etc.
-
-These individual commands are called "statements" in imperative programming languages. You can compare them with sentences in the English language. They have a use by themselves, and do not need something else. "The man eats bread." is a full sentence, it conveys a meaning by itself. A sentence in English is always terminated by a period.
-
-Similarly, a statement in JavaScript should provide a command by itself. JavaScript-statements are (almost always) terminated by a semicolon.
-
-This is a complete statement:
-
-```js
-let s = "HackYourFuture";
-```
-
-It is a full command: declare a variable `s` and initialize it with `"HackYourFuture"`. JavaScript doesn't need any other information to know what we want. The statement is terminated with a semicolon.
-
-However, this is not a complete statement:
-
-```js
-4 + 5
-```
-
-This equals `9`, but what is JavaScript to do with it? It doesn't provide a command. You'd need to do something with it, e.g. `let x = 4 + 5;` or `callFunction(4 + 5)`. We call these parts of statements "expressions". Expressions are not terminated by semicolons. Expressions always "evaluate into a value". In our example, the expression `4 + 5` "evaluates into `9`". If expressions cannot be evaluated into a value, they are invalid. For instance, `4 +` is not a valid expression, it is incomplete, because we need something else after the plus sign.
-
-So, statements can *contain* expressions. Can expressions contain statements? No, they cannot. However, they can themselves contain expressions. Think about `4 + 5`: it contains the expressions `4` and `5`, as these both evaluate into a value: the expression `4` evaluates into the number `4`, it is a very simple expression. Similarly, `true`, `null`, `undefined` are all expressions.
-
-### Examples of expressions
-
-Here are some examples of expressions. Remember: expressions evaluate into a value, but do not provide a command:
-
-* `sum(a, b)`
-* `a`
-* `a > 4 ? "yes" : "no"`
-* `a + b`
-* `a && b || c`
-* `arr.length`
-* `obj["name"]`
-* `[1, 2, 3]`
-* `arr[1]`
-* `[1]` (this is an array with one element!)
-* `function a() { return 4; }`
-
-The last one requires a bit of explanation. If you write:
-
-```js
-function a() { return 4; }
-```
-
-by itself, this is a *statement* (a function declaration statement). However, if you write it as part of a statement, such as:
-
-```js
-let b = function a() { return 4; }
-```
-
-now it is an expression. This is an exceptional situation where something can be a statement or an expression.
-
-### Examples of not-expressions
-
-The following are not expressions:
-
-* `let` -> this is a keyword, see below
-* `let x;` -> this is a statement
-* `+` -> this is only an operator
-* `if (a > 4) { return "yes"; } else { return "no"; }`
-
-`if` is also a statement. However, it is quite a complex statement. It is also referred to as a "construct", just like `for`, `while`, `try`, etc.
-
-### Keywords
-
-Some words in JavaScript are special, e.g. `var`, `if`, `while`, `return`. These are called "keywords". You typically cannot use these words as names for your variables, functions.
\ No newline at end of file
diff --git a/fundamentals/XMLHttpRequest.md b/fundamentals/XMLHttpRequest.md
deleted file mode 100644
index bdb0b5955..000000000
--- a/fundamentals/XMLHttpRequest.md
+++ /dev/null
@@ -1,59 +0,0 @@
-# XMLHttpRequest
-
-**XMLHttpRequest** is an object to interact with servers. You can retrieve data from a URL without having to do a full page refresh. XMLHttpRequest is used heavily in Ajax programming - [MDN](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest).
-
-So what is Ajax?
-
-**Ajax** is a method of exchanging data with a server, and updating parts of a web page without reloading the entire page.
-
-Let's dive into the code:
-
-First, we need to make an instance from 'XMLHttpRequest' object.
-
-```js
-let http = new XMLHttpRequest();
-```
-
-When we are doing a request it goes through 5 states:
-
-| Value | Description |
-| :-----: | ------------ |
-| 0 | request is not initialized. |
-| 1 | request has been set up. |
-| 2 | request has been sent. |
-| 3 | request is in process. |
-| 4 | request is complete. |
-
-In the code below we are checking if the request is complete or not, and we check the status === 200 just to make sure that we do not get a 404 error - Read more about it here: [HTTP Status Code](https://httpstatuses.com).
-```js
-http.onreadystatechange = function () {
- if (http.readyState === 4 && http.status === 200) {
- console.log('Response from the server: ' + http.response);
- }
-}
-```
-
-There are methods to deal with a server like (GET, POST, UPDATE, DELETE…)
-
-| Method | Description |
-| ------ | ------------ |
-| `GET` | retrieve data from server. |
-| `POST` | send data to server. |
-| `UPDATE` | update data on the server. |
-| `DELETE` | delete date from the server. |
-
-To initialize a request we use [open](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open) method. The syntax is:
-```js
-XMLHttpRequest.open(method, url, async, user, password);
-```
-
-The parameters _method_ and _url_ are mandatory, _user_ and _password_ are optional. True is a default value for _async_.
-
-```js
-http.open("GET", URL, true/false);
-```
-At the end we have to send our request to the server through [send](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send) method. In our situation we are retrieving a data from the server, so we do not have to pass a parameter to the send request.
-
-```js
-http.send();
-```
diff --git a/fundamentals/array_manipulation.md b/fundamentals/array_manipulation.md
deleted file mode 100644
index 853e13b83..000000000
--- a/fundamentals/array_manipulation.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# Array Manipulations
-
-[MDN on Arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
-As we know by now, arrays are collections of values.
-
-As we will see, there are often many ways to achieve the same thing when working arrays. Over time, you will add different techniques to your mental toolbox to achieve the result you want quickly.
-
-The basics.
-
-- How do we create an array?
-- How do we add items to an array?
-- How do we change items of an array?
-- How do we remove items from an array?
-- How do we know the length of an array?
-- How do we iterate over an array?
-
-
-## How do we create an array?
-An array can be created multiple ways
-
-From scratch:
-```js
-const a = []; // result: []
-const b = ['item1', 'item2']; // result: ['item1', 'item2']
-const c = new Array(); // result: []
-const d = new Array('item 1', 'item2'); // result: ['item1', 'item2']
-const e = new Array(20); // result: [ <20 empty items> ]
-const f = new Array(20, 21); // result: [20, 21]
-// Note that `e` and `f` are a beautiful example of how weird and unexpected JavaScript can be. You will probably use `a` most often.
-```
-
-From value (as an example, many ways to create an array from another value):
-```js
-const a = 'hello world'; // result: 'hello world'
-const b = a.split(' '); // result: ['hello', 'world' ]
-```
-
-## Array length
-Every array has as a 'static' property `length`. Meaning that we can easily get the amount of items in an array.
-```js
-const f = ['hi','there'];
-console.log(f.length); // 2
-```
-
-## Array index
-We can access array elements through the position of the element in the array. This is called an index. Indices (plural of index) are 0-based, meaning that the first item's index is 0, the second element is 1.
-
-```js
-const x = ['first', 'second', 'third'];
-console.log(x[0]); // 'first'
-
-x[3] = 'fourth';
-```
-
-Note that arrays can have empty values. This should be avoided usually to prevent unexpected behaviour.
-```js
-x[10] = 'eleventh';
-console.log(x); // [ 'first', 'second', 'third', 'fourth', <6 empty items>, 'eleventh' ]
-```
-
-Next to the index, we have a wide range of tools to manipulate arrays.
-
-## Array methods
-These methods are essential.
-
-**Extremely important is to remember to always ask these two questions**:
-- What is the return value of this method?
-- What does this method do to the original array it is used on?
-
-**Adding items**
-- [`.push()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) Add item to end of array
-- [`.unshift()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) Add item to beginning of array
-
-**Removing items**
-- [`.shift()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) Remove first element from array
-- [`.pop()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop) Remove last element from array
-- [`.splice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) Remove a specific element from array using index
-
-**Useful iterators over arrays**
-- [`.map()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) creates a new array with the results of calling a provided function on every element in the calling array.
-- [`.filter()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) creates a new array with all elements that pass the test implemented by the provided function.
-- [`.sort()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) sorts the elements of an array in place and returns the array
diff --git a/fundamentals/assets/box.png b/fundamentals/assets/box.png
deleted file mode 100644
index 872c80221..000000000
Binary files a/fundamentals/assets/box.png and /dev/null differ
diff --git a/fundamentals/assets/call-stack.png b/fundamentals/assets/call-stack.png
deleted file mode 100644
index 1c82bcf76..000000000
Binary files a/fundamentals/assets/call-stack.png and /dev/null differ
diff --git a/fundamentals/assets/event-loop-1.png b/fundamentals/assets/event-loop-1.png
deleted file mode 100644
index 7e84b3c25..000000000
Binary files a/fundamentals/assets/event-loop-1.png and /dev/null differ
diff --git a/fundamentals/assets/event-loop-2.png b/fundamentals/assets/event-loop-2.png
deleted file mode 100644
index cc4f704ce..000000000
Binary files a/fundamentals/assets/event-loop-2.png and /dev/null differ
diff --git a/fundamentals/assets/event-loop-3.png b/fundamentals/assets/event-loop-3.png
deleted file mode 100644
index 92dda5a12..000000000
Binary files a/fundamentals/assets/event-loop-3.png and /dev/null differ
diff --git a/fundamentals/assets/event-loop-4.png b/fundamentals/assets/event-loop-4.png
deleted file mode 100644
index ba8aba6ea..000000000
Binary files a/fundamentals/assets/event-loop-4.png and /dev/null differ
diff --git a/fundamentals/assets/event-loop-5.png b/fundamentals/assets/event-loop-5.png
deleted file mode 100644
index cfa41cab0..000000000
Binary files a/fundamentals/assets/event-loop-5.png and /dev/null differ
diff --git a/fundamentals/assets/map-filter-reduce-emoji.png b/fundamentals/assets/map-filter-reduce-emoji.png
deleted file mode 100644
index 4765acbdd..000000000
Binary files a/fundamentals/assets/map-filter-reduce-emoji.png and /dev/null differ
diff --git a/fundamentals/assets/prototype.png b/fundamentals/assets/prototype.png
deleted file mode 100644
index 8826c60bc..000000000
Binary files a/fundamentals/assets/prototype.png and /dev/null differ
diff --git a/fundamentals/assets/reduce-bucket.png b/fundamentals/assets/reduce-bucket.png
deleted file mode 100644
index 128b82165..000000000
Binary files a/fundamentals/assets/reduce-bucket.png and /dev/null differ
diff --git a/fundamentals/assets/scopes.png b/fundamentals/assets/scopes.png
deleted file mode 100644
index 73e231d85..000000000
Binary files a/fundamentals/assets/scopes.png and /dev/null differ
diff --git a/fundamentals/assets/sync-async.png b/fundamentals/assets/sync-async.png
deleted file mode 100644
index 6894b3531..000000000
Binary files a/fundamentals/assets/sync-async.png and /dev/null differ
diff --git a/fundamentals/bug-challenge-es6/.babelrc b/fundamentals/bug-challenge-es6/.babelrc
deleted file mode 100644
index 95d286c84..000000000
--- a/fundamentals/bug-challenge-es6/.babelrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "presets": ["es2015", "stage-1"],
- "compact": true
-}
\ No newline at end of file
diff --git a/fundamentals/bug-challenge-es6/.gitignore b/fundamentals/bug-challenge-es6/.gitignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/fundamentals/bug-challenge-es6/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/fundamentals/bug-challenge-es6/__tests__/bug-challenge-tests.js b/fundamentals/bug-challenge-es6/__tests__/bug-challenge-tests.js
deleted file mode 100644
index e72808093..000000000
--- a/fundamentals/bug-challenge-es6/__tests__/bug-challenge-tests.js
+++ /dev/null
@@ -1,228 +0,0 @@
-import BugChallenge from '../bug-challenge';
-import '../jest-helpers';
-
-describe('Bug challenge ES6', () => {
-
- let challenge;
- beforeEach(() => {
- console.clear();
- challenge = new BugChallenge();
- });
-
- describe('bug1', () => {
-
- it("should list the names and ages of people", () => {
- challenge.bug1();
-
- expect(console.logs).toEqual([
- "Alice is 25",
- "Bob is 27",
- "Charlie is 40"
- ]);
- });
-
- });
-
- describe('bug2', () => {
-
- it("should list all items in the array in reverse order", () => {
- challenge.bug2();
-
- expect(console.logs).toEqual([
- '4',
- '3',
- '2',
- '1'
- ]);
- });
-
- });
-
- describe('bug3', () => {
-
- it("should output the total of the indices (0 + 1 + 2 = 3)", () => {
- challenge.bug3();
-
- expect(console.logs).toEqual([
- '3'
- ]);
- });
-
- });
-
- describe('bug4', () => {
-
- it("should list all movies and actors, except the top 3", () => {
- challenge.bug4();
-
- expect(console.logs).toEqual([
- 'movie: Pulp Fiction',
- 'movie: Fight club',
- 'movie: Forrest Gump',
- 'movie: Inception',
- 'movie: Goodfellas',
- 'movie: The Matrix',
- 'movie: Interstellar',
- 'actor: Al Pacino',
- 'actor: Daniel Day-Lewis',
- 'actor: Duston Hoffman',
- 'actor: Tom Hanks',
- 'actor: Anthony Hopkins',
- 'actor: Paul Newman',
- 'actor: Denzel Washington'
- ]);
- });
-
- });
-
- describe('bug5', () => {
-
- it("should fetch with caching disabled", () => {
- challenge.bug5();
-
- expect(console.logs).toEqual([
- 'fetch: GET http://www.example.com (useCaching=false)'
- ]);
- });
-
- });
-
- describe('bug6', () => {
-
- it("should run main.js", () => {
- challenge.bug6();
-
- expect(console.logs).toEqual([
- 'run: script=main.js'
- ]);
- });
-
- });
-
- describe('bug7', () => {
-
- it("should first run with stopOnError=all and then with stopOnError=null", () => {
- challenge.bug7();
-
- expect(console.logs).toEqual([
- 'run: stopOnError=all',
- 'run: stopOnError=null'
- ]);
- });
-
- });
-
-
- describe('bug8', () => {
-
- it("should lists numbers 1 through 6", () => {
- challenge.bug8();
- jest.runAllTimers();
-
- expect(console.logs).toEqual([
- '1',
- '2',
- '3',
- '4',
- '5'
- ]);
- });
-
- });
-
- describe('bug9', () => {
-
- it("should list only BMWs", () => {
- challenge.bug9();
-
- expect(console.logs).toEqual([
- 'BMW i8',
- 'BMW M3'
- ]);
- });
-
- });
-
- describe('bug10', () => {
-
- it("should print 'Help'", () => {
- challenge.bug10();
-
- expect(console.logs).toEqual([
- 'Help'
- ]);
- });
-
- });
-
- describe('bug11', () => {
-
- it("should correctly add players Alice & Bob", () => {
- challenge.bug11();
-
- expect(console.logs).toEqual([
- 'Player Alice has 0 points',
- 'Player Bob has 0 points'
- ]);
- });
-
- });
-
- describe('bug12', () => {
-
- it("should not change the value of the outer y", () => {
- challenge.bug12();
-
- expect(console.logs).toEqual([
- 'Printing vector at (6, 7)',
- 'y=5'
- ]);
- });
-
- });
- describe('bug13', () => {
- it("should return that AI, Godfather and Inception are in the top10 movie list", () => {
- challenge.bug13();
- jest.runAllTimers();
-
- expect(console.logs).toEqual([
- "Independence Day is not in the top 10!",
- "AI is in the top 10!",
- "Godfather is in the top 10!",
- "Inception is in the top 10!"
- ]);
- });
-
- });
- describe('bug14', () => {
- it("should return that AI is best movie ever", () => {
- challenge.bug14();
- jest.runAllTimers();
-
- expect(console.logs).toEqual([
- "AI is best movie ever",
- "Godfather is not best movie ever",
- ]);
- });
- });
- describe('bug15', () => {
- it("should return Al Pacino as first actor after sorting alphabetically", () => {
- challenge.bug15();
- jest.runAllTimers();
-
- expect(console.logs).toEqual([
- 'The first actor when sorted alphabetically is Al Pacino'
- ]);
- });
- });
- describe('bug16', () => {
- it("should return that Al Pacino is ranked 4th among all actors", () => {
- challenge.bug16();
- jest.runAllTimers();
-
- expect(console.logs).toEqual([
- 'Al Pacino is ranked 4'
- ]);
- });
- });
-});
diff --git a/fundamentals/bug-challenge-es6/bug-challenge.js b/fundamentals/bug-challenge-es6/bug-challenge.js
deleted file mode 100644
index 2c71969de..000000000
--- a/fundamentals/bug-challenge-es6/bug-challenge.js
+++ /dev/null
@@ -1,237 +0,0 @@
-export default class BugChallenge {
- //Do NOT change the top10Movies and top10Actors variables to fix your tests
- //believe me: the problem is in bug() functions, not in these arrays ;)
- top10Movies = [
- 'AI',
- 'Shawshank Redemption',
- 'Godfather',
- 'Pulp Fiction',
- 'Fight club',
- 'Forrest Gump',
- 'Inception',
- 'Goodfellas',
- 'The Matrix',
- 'Interstellar'
- ]
- top10Actors = [
- 'Marlon Brando',
- 'Jack Nickolson',
- 'Robert De Niro',
- 'Al Pacino',
- 'Daniel Day-Lewis',
- 'Duston Hoffman',
- 'Tom Hanks',
- 'Anthony Hopkins',
- 'Paul Newman',
- 'Denzel Washington'
-
- ]
- //------
- // Bugs
-
- bug1() {
- const people = [{
- name: 'Alice',
- age: 25
- }, {
- name: 'Bob',
- age: 27
- }, {
- name: 'Charlie',
- age: 40
- }];
-
- for (let person in people) {
- console.log(`${person.name} is ${person.age}`);
- }
- }
-
- bug2() {
- const array = [1, 2, 3, 4];
-
- for (let i = 0; i < array.length; i++) {
- console.log(array.pop());
- }
- }
-
- bug3() {
- const array = {};
- array[0] = 'a';
- array[1] = 'b';
- array[2] = 'c';
-
- let total = 0;
- for (let key in obj) {
- total += key;
- }
-
- console.log(total);
- }
-
- bug4() {
- // We list all movies, except the top 3.
- let index = 3;
- for (index; index < this.top10Movies.length; index++) {
- console.log(`movie: ${this.top10Movies[index]}`);
- }
-
- // We also list all actors, except the top 3.
- for (index; index < top10Actors.length; index++) {
- console.log(`actor: ${this.top10Actors[index]}`);
- }
- }
-
- bug5() {
- const defaultMethod = 'GET';
- const defaultUseCaching = true;
-
- function fetch(options) {
- const url = options.url;
- const method = options.method || defaultMethod;
- const useCaching = options.useCaching || defaultUseCaching;
-
- console.log(`fetch: ${method} ${url} (useCaching=${useCaching})`);
- }
-
- fetch({
- url: 'http://www.example.com',
- useCaching: false
- });
- }
-
- bug6() {
- function run(options) {
- if (options.script == undefined) {
- options.script = 'main.js';
- }
-
- console.log(`run: script=${options.script}`);
- }
-
- run();
- }
-
- bug7() {
- function run(options = {}) {
- if (options.stopOnError == undefined) {
- options.stopOnError = 'all';
- }
-
- console.log(`run: stopOnError=${options.stopOnError}`);
- }
-
- run();
- run({stopOnError: null});
- }
-
- bug8() {
- for (let i = 0; i < 5; i++) {
- setTimeout(function () {
- console.log(i+1);
- }, 100*i);
- }
- }
-
- bug9() {
- const cars = [{
- make: 'Volvo',
- type: 'S90'
- }, {
- make: 'BMW',
- type: 'i8'
- }, {
- make: 'BMW',
- type: 'M3'
- }, {
- make: 'Audi',
- type: 'A6'
- }];
-
- function findCars(make) {
- return cars.filter(car => car.make = make);
- }
-
- for (let bmw of findCars('BMW')) {
- console.log(`${bmw.make} ${bmw.type}`);
- }
- }
-
- bug10() {
- const command = 'printHelp';
-
- switch (command) {
- case 'printMath':
- console.log(`√9=${Math.sqrt(9)}`);
- case 'printHelp':
- console.log('Help');
- case 'quit':
- console.log('Quitting');
- }
- }
-
- bug11() {
- class Game {
- constructor() {
- this.players = [];
- }
-
- addPlayers(names) {
- names.forEach(function (name) {
- this.players.push({name, points: 0});
- });
- }
- }
-
- const game = new Game();
- game.addPlayers(['Alice', 'Bob']);
-
- for (let player of game.players) {
- console.log(`Player ${player.name} has ${player.points} points`);
- }
- }
-
- bug12() {
- let y = 5;
-
- function printVector() {
- let x = 6;
- y = 7;
-
- console.log(`Printing vector at (${x}, ${y})`);
- }
-
- printVector();
- console.log(`y=${y}`);
- }
-
- bug13() {
- let notInTop10 = (movieName) => {
- return !this.top10Movies.indexOf(movieName)
- }
- console.log('Independence Day is ' + (notInTop10('Independence Day')?'not ':'') + 'in the top 10!');
- console.log('AI is ' + (notInTop10('AI')?'not ':'') + 'in the top 10!');
- console.log('Godfather is ' + (notInTop10('Godfather')?'not ':'') + 'in the top 10!');
- console.log('Inception is ' + (notInTop10('Inception')?'not ':'') + 'in the top 10!');
- }
- bug14() {
-
- console.log('AI is ' + (isInFirstPlace('AI')?'':'not ') + 'best movie ever')
- console.log('Godfather is ' + (isInFirstPlace('Godfather')?'':'not ') + 'best movie ever')
- let isInFirstPlace = (movieName) => {
- return this.top10Movies[0] === movieName
- }
- }
- bug15() {
- let getAlphabeticalFirst = function() {
- return this.top10Actors.sort()[0]
- }
-
- console.log(`The first actor when sorted alphabetically is ${getAlphabeticalFirst()}`)
- }
- bug16() {
- const ranking = this.top10Actors.indexOf('Al Pacino');
- // let thirdRankedActor = this.top10Actors['2'];
- console.log(`Al Pacino is ranked ${ranking + '1'}`)
- }
-
-}
diff --git a/fundamentals/bug-challenge-es6/jest-helpers.js b/fundamentals/bug-challenge-es6/jest-helpers.js
deleted file mode 100644
index afe72fe76..000000000
--- a/fundamentals/bug-challenge-es6/jest-helpers.js
+++ /dev/null
@@ -1,10 +0,0 @@
-jest.useFakeTimers();
-
-console.logs = [];
-
-console.clear = function() {
- console.logs = [];
-}
-console.log = function(message) {
- console.logs.push(message.toString());
-}
diff --git a/fundamentals/bug-challenge-es6/package.json b/fundamentals/bug-challenge-es6/package.json
deleted file mode 100644
index 6f5562561..000000000
--- a/fundamentals/bug-challenge-es6/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "bug-challenge-es6",
- "jest": {
- "automock": false,
- "testPathIgnorePatterns": [
- "/node_modules/"
- ]
- },
- "scripts":{
- "test": "jest"
- },
- "devDependencies": {
- "babel-core": "^6.18.2",
- "babel-jest": "^17.0.2",
- "babel-preset-es2015": "^6.18.0",
- "babel-preset-stage-1": "^6.16.0",
- "jest": "^17.0.3",
- "jest-cli": "^17.0.3"
- }
-}
diff --git a/fundamentals/code_commenting.md b/fundamentals/code_commenting.md
deleted file mode 100644
index cae3e9891..000000000
--- a/fundamentals/code_commenting.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Code Commenting
-
-First the straightforward part: how do we place comments in our code?
-
-## JavaScript
-Single line comments
-```js
-// Change heading:
-document.getElementById("myH").innerHTML = "My First Page";
-```
-
-Single line comments at end of the line:
-```js
-const x = 5; // Declare x, give it the value of 5
-```
-
-Coding **well** in JavaScript: [JSDoc](http://usejsdoc.org/)
-
-## HTML
-[W3Schools](https://www.w3schools.com/html/html_comments.asp)
-Comments
-```html
-
-
-
-```
-
-
-## CSS
-[MDN on CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments)
-```css
-/* Comment */
-
-/*
-A comment
-which stretches
-over several
-lines
-*/
-```
-
-## When to comment?
-Now for the hard part: when to comment? When you work for different companies, you will see different styles. Embrace something you like, and then learn to let go. Google on "when to comment code?" and you'll find a big bunch of different opinions.
-
-The general concept is, however, that it is there to help make the code more easy to understand. Note, however, that comments can also make code more difficult to understand when not applied properly.
diff --git a/fundamentals/code_formatting.md b/fundamentals/code_formatting.md
deleted file mode 100644
index 003180e54..000000000
--- a/fundamentals/code_formatting.md
+++ /dev/null
@@ -1,257 +0,0 @@
-# Code Formatting
-
-When you write your JavaScript code you need to take into account two types of consumer:
-
-1. Human readers (you yourself, your co-workers, classmates, you yourself in a year's time from now, etc.).
-2. The JavaScript engine.
-
-Starting with the latter, the JavaScript engine does not care about code formatting at all and is perfectly happy to work with one-letter variable names. 'Minification' is a process that is sometimes used to reduce the size of JavaScript files hosted on a web server so that they take less time to transfer over a network to a web browser. The code below show some 'minified' code.
-
-```js
-const o=[6,3,10,1].reduce((o,c)=>(o.push(c*c),o),[]);console.log(o);
-```
-
-Clearly, the above code is incomprehensible to humans. The original code is shown below, nicely formatted for the benefit of human readers.
-
-```js
-const arr = [6, 3, 10, 1];
-const squares = arr.reduce((acc, elem) => {
- acc.push(elem * elem);
- return acc;
-}, []);
-console.log(squares); // -> [36, 9, 100, 1]
-```
-
-In comparison with the minified code, the original code makes use of new lines and indentation to show structure and uses meaningful variable names, solely for the benefit of the human reader.
-
-Over time, a standard way of formatting JavaScript code has emerged (actually this standard is fairly common across all languages that are derived from the C-language, including JavaScript but also C++, Java and C#).
-
-In the next sections we will discuss the most important code formatting conventions for JavaScript. At the end of this document you will find some code that is formatted according to these rules.
-
-## Blank lines
-
-Use a single blank line to separate blocks of related code. This is similar to separating paragraphs with a blank line in written text.
-
-## Curly braces
-
-Curly braces are used to start and end code blocks, often as part of an `if`, `switch`, `while` or `for` statement. The opening curly brace should be placed at the end of a line. The closing curly brace should be aligned with the beginning of the line that started the code block.
-
-```js
-if (condition) {
- // ...
-} else {
- // ...
-}
-```
-
-## Indentation
-
-Code blocks inside curly braces should be indented by 2 or 4 spaces (choose one or the other, and then stick to it). In case of nested code blocks, for each level of nesting the amount of indentation should be incremented by the standard amount (2 or 4):
-
-```js
-function myFunction() {
- if (condition) {
- // ...
- } else {
- // ...
- }
-}
-```
-
-## Spacing
-
-- Add a space after keywords, e.g. `if (`, `for (`
-- Add a space after a `,` `;` (in a `for` loop) and `:` (e.g. object keys)
-- Add a space before and after operators, e.g. `a + b`
-
-## Use VSCode for well-formatted JavaScript
-
-Rather than continuing and specifying every little detail on how to format JavaScript code in a standard format, we can call in the help of VSCode.
-
-VSCode comes with a built-in code formatter for JavaScript. To format the current document in a standard fashion, press the following key combination:
-
-| | Windows | Mac | Linux |
-| --------- | ------- | ----- | ----- |
-| **Format Document** (make it pretty) | Shift‑Alt‑F | ⇧⌥F| Ctrl‑Shift‑I |
-
-Just make it a habit to bring this three-finger salute just before saving your document or whenever it becomes messy and you're good to go!
-
-> There are a number of user settings that you can apply in VSCode to enable auto-formatting as you type (or paste). See [VSCode Tips](../VSCodeTips/README.md#customise-vscode-settings) for further details.
->
-
-## ESLint
-
-[ESLint](https://eslint.org/) is a tool that can check your JavaScript code for common errors and bad practices. See [VSCode Tips](../VSCodeTips/README.md#installation-instructions) on how to set it up.
-
-ESLint is configured via user-definable rules that specify what to check. These rules must be defined in a file called `.eslintrc.json` placed in the root folder of your project repository. For the lectures and homework of the three HYF JavaScript modules it is recommended that you create an `.eslintrc.json` file and copy and paste the content shown below into that file.
-
-More information about ESLint Rules [here](https://eslint.org/docs/rules/).
-
-Make sure that you correct any errors and warnings that ESLint produces before considering your JavaScript code done!
-
-```json
-{
- "env": {
- "browser": true,
- "commonjs": true,
- "es6": true,
- "node": true
- },
- "parserOptions": {
- "ecmaFeatures": {
- "jsx": true
- },
- "sourceType": "module"
- },
- "extends": [
- "eslint:recommended"
- ],
- "rules": {
- "no-const-assign": "warn",
- "no-this-before-super": "warn",
- "no-undef": "warn",
- "no-unreachable": "warn",
- "no-unused-vars": "warn",
- "constructor-super": "warn",
- "valid-typeof": "warn",
- "no-var": "warn",
- "prefer-const": "warn",
- "no-multiple-empty-lines": "warn",
- "eol-last": [
- "error",
- "always"
- ],
- "no-console": "off",
- "camelcase": "warn",
- "eqeqeq": [
- "error",
- "always",
- {
- "null": "ignore"
- }
- ],
- "semi": [
- "warn",
- "always"
- ]
- }
-}
-```
-
-
-## Example of well-formatted code
-
-(With the help of the VSCode formatter and ESLint.)
-
-```js
-'use strict';
-
-const board = [
- ['T', 'T', '.', 'F'],
- ['T', '.', '.', '.'],
- ['.', '.', '.', '.'],
- ['R', '.', '.', 'W']
-];
-
-const robot = {
- x: 0,
- y: 0,
- dir: 'up',
-};
-
-let flagReached = false;
-let moves = 0;
-
-board.reverse();
-
-const trailIndicators = {
- left: '←',
- right: '→',
- up: '↑',
- down: '↓'
-};
-
-function render() {
- console.log('\n ' + moves + ':');
- for (let row = board.length - 1; row >= 0; row--) {
- const cells = board[row];
- let line = '';
- for (let col = 0; col < cells.length; col++) {
- line += ' ' + cells[col] + ' ';
- }
- console.log(line);
- }
- if (flagReached) {
- console.log('\nHurray! Flag reached in ' + moves + ' steps!');
- }
-}
-
-function move() {
- let x = robot.x;
- let y = robot.y;
-
- switch (robot.dir) {
- case 'up':
- y = y < board.length - 1 ? y + 1 : y;
- break;
- case 'down':
- y = y > 0 ? y - 1 : y;
- break;
- case 'left':
- x = x > 0 ? x - 1 : x;
- break;
- case 'right':
- x = x < board[y].length - 1 ? x + 1 : x;
- break;
- }
-
- const cellContents = board[y][x];
-
- if (cellContents === '.' || cellContents === 'F') {
- board[robot.y][robot.x] = trailIndicators[robot.dir];
- robot.x = x;
- robot.y = y;
- board[y][x] = 'R';
- if (cellContents === 'F') {
- flagReached = true;
- }
- }
-
- moves += 1;
- render();
-}
-
-function turn(turnDirection) {
- if (turnDirection !== 'left' && turnDirection !== 'right') {
- console.log('ignoring invalid turn', turnDirection);
- }
- switch (robot.dir) {
- case 'up':
- robot.dir = turnDirection === 'left' ? 'left' : 'right';
- break;
- case 'down':
- robot.dir = turnDirection === 'left' ? 'right' : 'left';
- break;
- case 'left':
- robot.dir = turnDirection === 'left' ? 'down' : 'up';
- break;
- case 'right':
- robot.dir = turnDirection === 'left' ? 'up' : 'down';
- break;
- }
-}
-
-render();
-
-// start of robot game instructions
-move();
-turn('right');
-move();
-move();
-move();
-turn('left');
-move();
-move();
-// end of robot game instructions
-```
-
diff --git a/fundamentals/conditional_execution.md b/fundamentals/conditional_execution.md
deleted file mode 100644
index edbb811a7..000000000
--- a/fundamentals/conditional_execution.md
+++ /dev/null
@@ -1,198 +0,0 @@
-# Conditional execution
-
-The normal order of execution of statements in a computer program is in straight-line order, from top to bottom. However, sometimes it is desirable to execute one or more statements _conditionally_, i.e. depending on whether some condition – determined by the state of your program – holds true.
-
-## The `if` statement
-
-In its simplest form the `if` statement looks like this:
-
-```js
-if (condition) {
- // one or more statements that will be executed
- // if, and only if the condition holds true
-}
-```
-
-Here, `condition` is a boolean expression that resolves to either `true` or `false` (or, more precisely, any expression that is 'truthy' or 'falsy', as will be explained later).
-
-The statements within the curly braces `{` and `}` will be executed if the condition holds true, otherwise these statements will be skipped (i.e. ignored).
-
-An example:
-
-```js
-if (distance < 10) {
- console.log('I will take the bike.');
-}
-```
-
-Here, the condition is the boolean expression `distance > 10`, which is either `true` or `false`.
-
-It is also possible to add a statement block to be executed if (and only if) the condition does **not** hold true, using an `else` clause.
-
-```js
-if (distance < 10) {
- console.log('I will take the bike.');
-} else {
- console.log('I will go by car.');
-}
-```
-
-A condition can take more complex forms, using `&&` (logical AND) and `||` (logical OR) operators:
-
-```js
-if (distance < 10 && !raining) {
- console.log('I will take the bike.');
-} else {
- console.log('I will go by car.');
-}
-```
-
-In the example above `raining` is a boolean variable (either `true` or `false`), and the exclamation mark is the logical NOT operator that negates the boolean value (if it was `true` the result after negation is false and vice versa).
-
-For more complex decisions you can concatenate multiple conditions using `else if` clauses.
-
-```js
-if (distance < 1) {
- console.log('I will walk.');
-} else if (distance < 10) {
- console.log('I will take the bike.');
-} else if (distance < 50) {
- console.log('I will go by car.');
-} else {
- console.log('I will take the train.');
-}
-```
-
-The statement block inside an `if`, `else` or `else if` may itself contain nested `if` statements, as in this example:
-
-```js
-if (distance < 10) {
- if (raining) {
- console.log('I will go public transportation.');
- } else {
- console.log('I will walk.');
- }
-} else {
- console.log('I will go by car.');
-}
-```
-
-> As (nested) `if` statements can become quite complex it is very important that you indent your source code so that there can be no confusion about which statement blocks are executed for each condition, as was done in the examples.
-
->More information on MDN: [if...else](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else)
-
-## The conditional (ternary) operator
-
-This operator can be used as a shortcut for an `if` statement when dealing with expressions.
-
-The general format is:
-
-```js
-condition ? expr1 : expr2
-```
-
-('ternary' means: _composed of three parts_)
-
-It is often used in combination with an assignment, as in this example:
-
-```js
-const conditionOfCar = age < 1 ? 'new' : 'used';
-```
-
-The `conditionOfCar` variable will be assigned the string `'new'` if the `age < 1` condition holds true, otherwise it is assigned the string `'used'`.
-
-It is always possible to rewrite a ternary operator as an `if-then-else` statement, for example:
-
-```js
-let conditionOfCar;
-if (age < 1) {
- conditionOfCar = 'new';
-} else {
- conditionOfCar = 'used';
-}
-```
-
-Note that you can't use `const` here for `conditionOfCar` because we can't combine declaration and initialization in a single statement. Therefore we must now use `let`.
-
-It is **not** recommended to use the conditional operator if you do not intend to use its value:
-
-```js
-// Don't do this: it's yucky code
-age < 1 ? console.log('new') : console.log('used');
-```
-
->More information on MDN: [Conditional (ternary) Operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator)
-
-## The switch statement
-
-The `switch` statement can sometimes be a useful alternative to a concatenation of `if` statements. This is the case when the condition is an expression that can be decomposed into a number of distinct values or _cases_, as shown in the example below.
-
-```js
-const hyfModule = 'JavaScript-1';
-
-switch (hyfModule) {
- case 'HTML/CSS':
- console.log('In this module you will learn HTML and CSS.');
- break;
- case 'JavaScript-1':
- console.log('In this module you will learn Git and JavaScript basics.');
- break;
- case 'JavaScript-2':
- console.log('In this module you will learn about JavaScript in the browser with HTML and CSS.');
- break;
- case 'JavaScript-3':
- console.log('In this module you will learn about Async and API calls.');
- break;
- case 'Node':
- console.log('This module is about building server and CLI applications using Node.');
- break;
- case 'Database':
- console.log('In this module is about Relational and Non-Relational Data and Database Systems.');
- break;
- case 'React':
- console.log('In this module you will to build Single Page Applications using React.');
- break;
- case 'Project':
- console.log('In this final module you will do your graduation project.');
- break;
- default:
- console.log('This module is unknown: ' + hyfModule);
-}}
-```
-
-Depending on the value of the expression specified in the `switch` clause, one of the `case` statement blocks is executed. Each statement block should end with a `break` statement to ensure that a `case` doesn't 'fall through' into the next `case`.
-
-The `default` statement at the end is executed when none of the preceding cases hold true. The `default` statement is not strictly required, but is a best practice to always specify one.
-
->More information on MDN: [switch](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch)
-
-## truthy, falsy
-
-**truthy**: 'sort of' `true`
-**falsy**: 'sort of' `false`
-
-From MDN:
-
-In JavaScript, a **truthy** value is a value that is considered true when evaluated in a Boolean context. All values are truthy unless they are defined as **falsy**.
-
-**falsy** values are:
-
-- `false`
-- `0`
-- `""`
-- `null`
-- `undefined`
-- `NaN`
-
-The example below will print `x is undefined` because `undefined` is **falsy**.
-
-```js
-let x;
-if (x) {
- console.log('x is defined');
-} else {
- console.log('x is undefined');
-}
-```
-
->More information on MDN: [Truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), [Falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy)
\ No newline at end of file
diff --git a/fundamentals/event_loop.md b/fundamentals/event_loop.md
deleted file mode 100644
index 6c3185477..000000000
--- a/fundamentals/event_loop.md
+++ /dev/null
@@ -1,180 +0,0 @@
-# Event Loop
-
-## YouTube Video
-
-This article is a companion to the excellent YouTube video [What the heck is the event loop anyway?](https://www.youtube.com/watch?v=8aGhZQkoFbQ) by Philip Roberts.
-
-[](https://www.youtube.com/watch?v=8aGhZQkoFbQ "Event Loop")
-
-## Introduction
-
-The way of programming when developing JavaScript applications for the browser is sometimes called _Event-Driven Programming_. Once a JavaScript program has been loaded in the browser and has completed its initialization, it is normally waiting for specific "events" to happen. These events can take the form of mouse movements and clicks, keyboard interactions and network-related events (e.g. a response from an `XMLHttpRequest`)*.
-
-In order for a JavaScript program to respond to a specific (type of) event, a programmer needs to add an "event listener" for the event type of interest to the target DOM element or network request object.
-
-Event examples are:
-
-- a `'click'` event from an HTML button element.
-- a `'load'` event from an XMLHttpRequest.
-
-A JavaScript program can also set up one or more timers and execute a function when a specific timeout expires. One could consider these to be _software-initiated_ events.
-
-When a event occurs, the browser places an object with information about the event along with the JavaScript function designated to handle the event in an Event Queue. When the JavaScript engine is idle (i.e. when the call stack is empty, see below), it picks up the next event from the Event Queue and invokes the corresponding event handler, passing the event object as a parameter. This mechanism could be depicted by the follow pseudo-code:
-
-```
-// Event Loop
-while (waiting_for_event) {
- execute_event_handler(event)
-}
-```
-
-
-\* Note: There are more [Web APIs](https://developer.mozilla.org/en-US/docs/Web/API) available in the browser that could potentially generate events, e.g. the [SpeechSynthesis API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis) and the [MIDIAccess API](https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess), to name just two.
-
-## Call Stack
-
-The JavaScript engine maintains a [call stack](https://developer.mozilla.org/en-US/docs/Glossary/Call_stack) to keep track of nested function calls. (The call stack is similar to a JavaScript array to which items are pushed and from which items are popped.)
-
-Figure 1 below depicts the call stack for a scenario where function **A**() calls function **B**(). The currently executing function is always the one at the top of the call stack. In this case, execution starts with function **A**().
-
-1. The JavaScript engine pushes **A**() on the call stack and starts its execution.
-2. Function **A**() calls function **B()**: the JavaScript engine suspends the execution of **A**() (taking note where it left off), pushes **B**() on the call stack and starts executing **B**().
-3. When function **B**() returns, the JavaScript engine pops **B**() off the stack. Since function **A**() is now again at the top the stack, the JavaScript engine resumes **A**() at the point where it left off.
-4. Finally, when function **A**() returns it is popped of the stack and with the call stack now empty, the JavaScript engine enters its event loop.
-
-
-
-Figure 1. Call Stack
-
-## Example Code
-
-We will use the example application below for our discussion of the event loop. The application consist of a simple HTML page with three buttons and an associated JavaScript file. The web page looks like this:
-
-
-
-All output resulting from button clicks will be printed in the browser's console.
-
-### index.html
-
-```html
-
-
-
- Codestin Search App
-
-
-
-
-
Sync/Async Demo
-
-
-
-
-
-
-
-```
-
-### app.js
-
-The JavaScript file `app.js` adds a `'click'` event listener for each of the three buttons. Rather than using anonymous functions for the event handlers, all functions are given a name so that these names show up in the call stack should we run this code in the Chrome debugger.
-
-```js
-'use strict';
-'use strict';
-{
- function synTimeout(delay) {
- const stopTime = Date.now() + delay;
- while (Date.now() < stopTime);
- }
-
- function addSyncOnClickListener() {
- document
- .getElementById('btn-sync')
- .addEventListener('click', function onSyncClick() {
- console.log('start sync timer');
- synTimeout(5000);
- console.log('stop sync timer');
- });
- }
-
- function addAsyncOnClickListener() {
- document
- .getElementById('btn-async')
- .addEventListener('click', function onAsyncClick() {
- console.log('start async timer');
- setTimeout(function onTimeout() {
- console.log('stop async timer');
- }, 5000);
- });
- }
-
- function addHelloOnClickListener() {
- document
- .getElementById('btn-hello')
- .addEventListener('click', function onHelloClick() {
- console.log('Hello, world!');
- });
- }
-
- window.onload = () => {
- addSyncOnClickListener();
- addAsyncOnClickListener();
- addHelloOnClickListener();
- };
-}
-```
-
-### Synchronous, blocking code
-
-In Figure 2.1 below, when the **START SYNC TIMER** button is clicked ①, a `click` event with its `onSyncClick` event handler is placed in the Event Queue and, because the call stack is empty, is immediately executed. The `onSyncClick` function calls the `synTimeout` function, passing the desired time delay in milliseconds in the `delay` parameter. The call stack at this point in time is depicted in ②.
-
-The `synTimeout` function keeps racing around in a tight `while` loop, in each loop iteration calling `Date.now()` to check whether the specified delay has already been reached. While the JavaScript engine is busy executing this `while` loop, it cannot run any other code. In particular, it cannot pick up events from the Event Queue, for instance click events from the **HELLO** button, while the loop is executing ③. The `onHelloClick` event handler awaits execution in the Event Queue (with the browser appearing to be unresponsive) until the `synTimeout` function completes, and with it, the `onSyncClick` function (Figure 2.2, ④).
-
-
-
-Figure 2.1 The Event Loop - blocking code.
-
-At this point the call stack becomes empty, and the event loop can pick up `onHelloClick` from the Event Queue and execute it ⑤. In the browser this is experienced as a delayed, sluggish response to the click on the **HELLO** button.
-
-Finally, when the `onHelloClick` event handler has finished execution, the call stack becomes empty again ⑥, and the event loop awaits further, future events.
-
-**In conclusion:** Synchronous, blocking code, such as implemented by
-the `synTimeout` function is to be avoided as it makes the application appear to be unresponsive.
-
-
-
-Figure 2.2 The Event Loop - blocking code - continued.
-
-## Asynchronous, non-blocking code
-
-In contrast, in Figure 3.1, when we click the **START ASYNC TIMER** button ①, the `onAsyncClick` event handler is placed and the Event Queue and, because the call stack is empty, is immediately executed ②. It in turn calls the `setTimeout` function provided by the browser (**not** the JavaScript engine!). This starts a timer internal to the browser ③. Once the timer has been set up the `setTimeout` function returns and subsequently the `onAsyncClick` event handler exits.
-
-Suppose that one second later we click the **HELLO** button ④. This causes the `onHelloClick` event handler to be placed in the Event Queue. Because the call stack is empty the `onHelloClick` event handler is immediately executed ⑤ and subsequently exits.
-
-
-
-Figure 3.1 The Event Loop - non-blocking code.
-
-
-When some time later the timer set up in step 3 expires, the `onTimeout` callback is placed in the event queue ⑥. Again, because the call stack is empty at that point in time it is immediately executed ⑦.
-
-
-
-Figure 3.2 The Event Loop - non-blocking code - continued.
-
-Subsequently it exits, leaving the call stack empty again ⑧, ready to take on new events from the event loop whenever they occur.
-
-
-
-Figure 3.3 The Event Loop - non-blocking code - continued.
-
-**In conclusion:** Asynchronous, non-blocking code is to be preferred at all times to ensure that the application maintains its responsiveness.
-
-## More Information
-
-Mozilla Developer Network: [Concurrency model and Event Loop](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop)
\ No newline at end of file
diff --git a/fundamentals/exercises.md b/fundamentals/exercises.md
deleted file mode 100644
index 981261c31..000000000
--- a/fundamentals/exercises.md
+++ /dev/null
@@ -1,206 +0,0 @@
-# JavaScript fundamentals - exercices
-
-### Given the following code:
-
-```js
-let s = "Hello";
-let x = s.toLowerCase();
-let l = s.length;
-```
-
-**1. What are the types of the following:**
-
-1. `s`
-2. `x`
-3. `s.toLowerCase()`
-4. `s.toLowerCase`
-5. `s.length`
-6. `l`
-
-----
-
-### 2. In `let x = 5 + 6;`, what is `+`?
-
-1. Function
-2. Operator
-3. Number
-4. Aggregator
-
-----
-
-### 3. In `let x = 5 + 6;`, what is `let`?
-
-1. Variable
-2. Keyword
-3. Operator
-4. Constant
-
-----
-
-### Given the following code:
-
-```js
-let x = z[y];
-```
-
-**4. What is `y`?**
-
-1. Index
-2. Key
-3. Index or key
-4. Array
-
-----
-
-### Given the following code:
-
-```js
-let y = 1;
-let x = [1, 2, 3];
-let z = x[y];
-```
-
-**5. What is `y`?**
-
-1. Index
-2. Key
-3. Index or key
-4. Array
-
-----
-
-### Given the following code:
-
-```js
-let joe = {
- name: 'Joe',
- age: 24
-};
-let joesName = joe.name;
-let joesAge = joe['age'];
-```
-
-**6. What is `'age'` in the last line?**
-
-1. Index
-2. Key
-3. Array
-4. Object
-
-**7. What are `name` and `age` of the object `joe`?**
-
-1. Index
-2. Key
-3. Object
-4. Property
-
-----
-
-### Given the following code:
-
-```js
-let y = 'length';
-let x = [1, 2, 3];
-let z = x[y];
-```
-
-**7. What is `y`**
-
-1. Index
-2. Key
-3. Index or key
-4. Array
-
-**8. What is the element for index `1` in array `x`?**
-
-**9. Fill in: "The value of the (...) `length` of `x` is (...)"**
-
-----
-
-### 10. What is the name of these functions?
-
-1. `function a() { return true; }`
-2. `let a = function b() { return true; }`
-3. `let c = function () { return true; }`
-
-----
-
-### 11. Write a function that has two parameters called `first` and `second`
-
-----
-
-### 12. Write a function call that passes three arguments.
-
-----
-
-### 13. Write code for the following
-
-1. Declare a variable called `x` and initialize it with the string "Hello".
-2. Declare a variable called `y` and initialize it with the property `length` of `x`.
-3. Declare a variable called `z` and initialize it with the result of calling the method `toUpperCase` on `x`
-4. Declare a function called `myFunction`. This function should take two arguments, and should call the second argument with the first argument as its argument. Then, declare a variable called `f` and initialize it with an empty anonymous function, and call `myFunction` with the arguments `10` and `f`.
-
-----
-
-### 14. Explain as precisely as possible (in English) what the following code does, line by line
-
-(Tip: it should look like the items in the previous question!)
-
-```js
-let s = "HackYourFuture";
-let i = s.indexOf("Your");
-function sum(a, b) { return a + b; }
-let s = sum(4, 5);
-let r = Math.sqrt(s);
-```
-
-----
-
-### 15. Indicate for each of these whether it is an expression or a statement:
-
-1. `l`
-2. `l = 4;`
-3. `l == 4`
-4. `if (l == 4) { console.log("yes"); }`
-E. `console.log("yes");`
-F. `"yes"`
-G. `console.log(l == 4 ? "yes" : "no")`
-H. `function a() { return 4; }`
-I. `let a = function () { return 4; }`
-
-----
-
-### 16. How can you tell whether something is a statement?
-
-----
-
-### 17. How can you tell whether something is an expression
-
-----
-
-### Given the following code:
-
-```js
-let s = "Hello".toLowerCase();
-let l = s.length;
-
-function sum(a, b) {
- return a + b;
-}
-let max = function (a, b) {
- return a > b ? a : b;
-}
-
-let s1 = sum(4, 5);
-let s2 = 4 + 5;
-
-if (s2 == s1) {
- console.log("same");
-} else {
- console.log("not same");
-}
-```
-
-**18. List all 11 *statements* in the code above**
-
-**19. List all 28 *expressions* in the code above (BONUS!)**
diff --git a/fundamentals/functions.md b/fundamentals/functions.md
deleted file mode 100644
index 9201e5a44..000000000
--- a/fundamentals/functions.md
+++ /dev/null
@@ -1,126 +0,0 @@
-# Functions
-
-Consider this **function** from [high-school math](https://www.mathplanet.com/education/algebra-2/how-to-graph-functions-and-linear-equations/functions-and-linear-equations):
-
-> 𝑓(x) = x + 7
->
-> _if x = 2 then_
->
-> 𝑓(2) = 2 + 7 = 9
-
-The value of the function 𝑓(x) is dependent on the value you supply for its argument x. (Instead of the term 'argument', sometimes the word 'parameter' is used).
-
-Here is the equivalent JavaScript function:
-
-```js
-// function definition
-function f(x) {
- return x + 7;
-}
-
-// call the function and log its value for x = 2
-console.log(f(2)); // -> 9
-```
-
-This function adds 7 to the value of its argument. Whenever we need to add 7 to some number we can reuse this same function over and over again.
-
-During execution, the value of x in the function body (the part between the curly braces) is substituted with the value 'passed' during the function call.
-
-A function thus is a reusable piece of code (see _Why Use Functions_ below). Functions are *very* important in JavaScript, to the extent that some people call JavaScript a "function-oriented" language. As mentioned above, variables can be of type function. In fact, *every function is a variable*.
-
-The following two pieces of code have the exact same result:
-
-```js
-function sum(a, b) {
- return a + b;
-}
-```
-
-and
-
-```js
-let sum = function (a, b) {
- return a + b;
-}
-```
-
-> Note
->
-> This is not entirely true, as in the second code, the function is "anonymous", i.e. it has no name. But in both cases, you can call the function like this: `sum(4, 5)`.
-
-## Parameters & arguments
-
-When writing `function sum(a, b)`, `a` and `b` are the "parameters" of the function. We say that this function has two parameters. (Sometimes, you'll see the word "arity": this function has "arity" 2, but that is something you don't have to use for now.)
-
-Now, when *calling* function sum, e.g. `let s = sum(4, 5);`, we say that the numbers `4` and `5` are the "arguments" of the function. Arguments are "passed" to the function: "we pass `4` and `5` to the function `sum`".
-
-So remember the difference between the word "parameter" and "argument". Many people confuse them, and that's not a big problem, but understanding the difference is always nice:
-
-* A parameter is the name you want to give to the variable that is available inside of the function.
-* An argument is the actual value you want to assign to the parameters when you call the function.
-
-A function that "has two parameters" is also said to "take/accept two arguments". But, sometimes you'll hear people say: "the function has two arguments" or "the function takes two parameters". While formally incorrect, you'll know what they mean.
-
-## Calling a function on something
-
-In JavaScript, you can call functions *on* something. By this, we mean that you use the dot to call the function. For instance, when we say "call method `trim` on string `s`", we mean:
-
-```js
-let s = " this is a string ";
-s.trim(); // -> "this is a string"
-```
-
-> Note
->
-> Technically, this means that the string `s` will become the `this` special variable inside of the function.
-
-However, there are functions that you don't call on anything:
-
-```js
-function sum(a, b) { return a + b; }
-sum(4, 5); // -> 9
-```
-
-Here, you call the function `sum` on nothing.
-
-Most built-in functions in JavaScript, like math functions or logging functions, also use the dot:
-
-```js
-Math.round(4.5);
-console.log("hello");
-Array.from([1, 2, 3]);
-```
-
-Indeed, these functions are also called "on" `Math`, `console`, `Array`, and so on. However, in this case, their purpose is more to group them logically, so here it's not very important to use that terminology. We'd rather say: "call the function `Math.round` with `4.5` as an argument", i.e. we include it in the full name of the methods.
-
-It's more when you think about which functions you can call "on" your own variables (strings, arrays, numbers, etc):
-
-```js
-myString.trim();
-myArray.slice();
-myNumber.toString();
-...
-```
-
-## Why Use Functions?
-
-> The following was adapted from https://www.cs.utah.edu/~zachary/computing/lessons/uces-10/uces-10/node11.html
-
-The first reason is **reusability**. Once a function is defined, it can be used over and over and over again. You can invoke the same function many times in your program, which saves you work.
-
-Another aspect of reusability is that a single function can be used in several different (and separate) programs. When you need to write a new program, you can go back to your old programs, find the functions you need, and reuse those functions in your new program. You can also reuse functions that somebody else has written for you.
-
-The second reason is **abstraction**. In order to use a particular function you need to know the following things:
-
-1. The name of the function;
-2. What the function does;
-3. What arguments you must give to the function; and
-4. What kind of result the function returns.
-
-But notice: If you just want to use the function in your program, you don't have to know how it works inside! You don't have to understand anything about what goes on inside the function.
-
-It's sort of like driving a car or using a telephone. With an automobile, you don't need to understand every detail about the engine and drive train and wheels, if all you want to do is drive the car. Similarly, with a telephone, you don't have to understand everything about the phone system in order to make a call.
-
-The only time you need to know how a function works inside is when you need to write the function, or change how it works. (It's like a car again; you need to know how a car works in order to build one or fix one.) But once a function is written and working, you never need to look at its insides again.
-
-Together, these two reasons make functions extremely useful--practically essential!-for programmers who write large programs. The ability to divide a program into abstract, reusable pieces is what makes it possible to write large programs that actually work right.
\ No newline at end of file
diff --git a/fundamentals/javascript_review.md b/fundamentals/javascript_review.md
deleted file mode 100644
index 41192de88..000000000
--- a/fundamentals/javascript_review.md
+++ /dev/null
@@ -1,261 +0,0 @@
-### JavaScript review
-
-You'll need to know the following before starting the Node class (remember Node is just JavaScript in a different environment - and you KNOW JS already - right?!?!)
-
-```
-From Jason:
-jason [9:11 AM]
-@timirkaria the most important topics will be sync/async and ajax. That and basic syntax (named and anonymous functions, callbacks, scope) should be sufficient!
-```
-
-### AJAX
-Stands for *A*synchronous *J*avascript *A*nd *X*ml (think of XML as the old JSON) but now it's AJA*J* but that doesn't sound as good.
-
-So here's an example of a SYNCHRONOUS request (it waits for the request to come back before continuing)
-
-Code from: `https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Synchronous_and_Asynchronous_Requests#Example_HTTP_synchronous_request`
-
-```js
-const SECRET_MESSAGE_URL = 'https://gist.githubusercontent.com/tkaria/08325583e7411f7de6b80871780fd917/raw/61dae2869ae5013652bbeba1da2487097d8869b1/SecretMessage.txt'
-const request = new XMLHttpRequest(SECRET_MESSAGE_URL);
-request.open('GET', SECRET_MESSAGE_URL, false); // `false` makes the request synchronous
-request.send(null);
-
-if (request.status === 200) {
- console.log(request.responseText);
- console.log('Received the response');
-}
-console.log('Made the request')
-
-```
-
-And here's an example of an ASYNCHRONOUS version of the same request as above. Look carefully at the output.
-
-```js
-const SECRET_MESSAGE_URL = 'https://gist.githubusercontent.com/tkaria/08325583e7411f7de6b80871780fd917/raw/61dae2869ae5013652bbeba1da2487097d8869b1/SecretMessage.txt'
-const xhr = new XMLHttpRequest();
-xhr.open("GET", SECRET_MESSAGE_URL, true);
-xhr.onload = function (e) {
- if (xhr.readyState === 4) {
- if (xhr.status === 200) {
- console.log(xhr.responseText);
- console.log('Received the response');
- } else {
- console.error(xhr.statusText);
- }
- }
-};
-xhr.onerror = function (e) {
- console.error(xhr.statusText);
-};
-xhr.send(null);
-console.log('Made the request');
-```
-
-### What's happening here?
-As always - read the docs first...
-`https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest`
-
-Create a new request and open it (lines 2 and 3)
-Tell the request object what function to call when when the contents of the request are loaded. Inside the ANONYMOUS function which takes a parameter `e` we check the response code from the request (this is just HTTP stuff - nothing special). If the response code is good (200) then we print what we got.
-
-More interesting is the order of the print statements. In the first example we saw the message `Received the response` **BEFORE** we saw the `Made the request` message because the program waited to get the response and print it before continuing to run.
-
-In this case we see the `Made the request` message before we see the response because the program keeps running while waiting for the response. When the response is finally received it is printed before writing the `Received the response` to the console.
-
-Note that we used an anonymous function here - it has no name. There's nothing special about an anonymous function. We could equally use a named function in the above example:
-
-```js
-const SECRET_MESSAGE_URL = 'https://gist.githubusercontent.com/tkaria/08325583e7411f7de6b80871780fd917/raw/61dae2869ae5013652bbeba1da2487097d8869b1/SecretMessage.txt'
-
-const xhr = new XMLHttpRequest();
-function NOT_ANONYMOUS_ON_LOAD_FUNCTION(parameter) {
- if (xhr.readyState === 4) {
- if (xhr.status === 200) {
- console.log(xhr.responseText);
- console.log('Received the response');
- } else {
- console.error(xhr.statusText);
- }
- }
-}
-xhr.open("GET", SECRET_MESSAGE_URL, true);
-xhr.onload = NOT_ANONYMOUS_ON_LOAD_FUNCTION; // Note: we are not CALLING the function - there are no ()
-// We'll leave the error function the way it is and you can change it to a named function
-xhr.onerror = function (e) {
- console.error(xhr.statusText);
-};
-xhr.send(null);
-console.log('Made the request');
-
-```
-
-### The big idea:
-
-#### Sync / Async
-Make requests without waiting for the response and just get "notified" when the response happens. That's the asynchronous part - don't wait for it and stop everything else just let me know when it happens. How can the computer let you know? You tell it what to do when the async function is ready (has something to say - success or failure)
-
-#### Named and anonymous functions
-Some functions have names and some don't. Sometimes you just want to use a function to pass it to another function so you don't need to name it. It never needs to be called outside of the function that you're passing it to so it doesn't need a name.
-The simplest asynchronous function that you will see all over the place is called `setTimeout` (right now you should be reaching for a new tab and typing `MDN setTimeout` into Google). Be patient when running the below - it takes 3 seconds...
-
-For example (using a named function):
-```js
-function timeoutFunction() {
- console.log('Starting timeoutFunction');
- console.log('Ending timeoutFunction');
-}
-setTimeout(timeoutFunction, 3000);
-console.log('After timeoutFunction');
-```
-
-For example (using an anonymous function):
-```js
-setTimeout(function() {
- console.log('Starting timeoutFunction');
- console.log('Ending timeoutFunction');
- } , 3000);
-console.log('After timeoutFunction');
-```
-
-For example (using an anonymous fat arrow function):
-```js
-setTimeout(() => { console.log('Starting timeoutFunction');
- console.log('Ending timeoutFunction');
- } , 3000);
-console.log('After timeoutFunction');
-```
-
-#### Callbacks
-What to do when the result of an async request is returned. Remember that requests can succeed as well as fail. Plan for (AND TEST) both.
-
-#### Scope
-I think we covered this pretty well with our discussion of closures in the last class but let me know if you need more.
-
-## Recap
-Read this - you may not understand it all but please read it before you read anything else about closures. The reason is that this is source material - this is the primary documentation. It is written very technically and in a bit of a boring way but there's a reason (as we talked about in class). The reason is to be clear so the language is precise and technical. It's OK if you don't get it now but just read it and it will stay in the back of your head.
-https://developer.mozilla.org/en/docs/Web/JavaScript/Closures
-
-Please TYPE these exercises - do NOT copy and paste. BEFORE you run them please make a guess in your head about what will happen.
-```js
-function init() {
- const name = 'Mozilla'; // name is a local variable created by init
- function displayName() { // displayName() is the inner function, a closure
- alert(name); // use variable declared in the parent function
- }
- displayName();
-}
-init();
-```
-
-```js
-function init() {
- const name = 'Mozilla'; // name is a local variable created by init
- function displayName() { // displayName() is the inner function, a closure
- alert(name); // use variable declared in the parent function
- }
-}
-displayName();
-```
-
-```js
-const name = 'Hack your future'
-function init() {
- const name = 'Mozilla'; // name is a local variable created by init
- function displayName() { // displayName() is the inner function, a closure
- alert(name); // use variable declared in the parent function
- }
- displayName();
-}
-init();
-```
-
-```js
-const name = 'Hack your future'
-function init(name) {
- function displayName(name) { // displayName() is the inner function, a closure
- alert(name); // use variable declared in the parent function
- }
- displayName(name);
-}
-init('Hack your future again')
-```
-
-Now read this: http://stackoverflow.com/questions/11488014/asynchronous-process-inside-a-javascript-for-loop
-
-And try out the examples - please make SURE you understand what is happening. Ask questions if you do not.
-
-Same instructions as above but now for Arrow functions (remember this is not intended to confuse you - it's just code).
-
-### Arrow functions
-https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions
-Then read this.
-http://stackoverflow.com/questions/22939130/when-should-i-use-arrow-functions-in-ecmascript-6/28135120#28135120
-
-This is a normal function:
-```js
-function sayHello(name) {
- return 'Hello ' + name;
-}
-```
-
-Same as above with arrow (fat arrow) notation - shorthand notation. This is easy to mess up. Notice no return.
-```js
-const sayHello2 = (name) => 'Hello ' + name;
-```
-
-Same as above with arrow (fat arrow) notation - shorthand notation. Better - easier to read - with return.
-```js
-const sayHello2 = (name) => {return 'Hello ' + name;}
-```
-
-Think about this one
-``` js
-function Person(firstName) {
- this.firstName = firstName;
-}
-```
-
-Looks the same but what happens? See if you can figure out why from reading the documentation.
-```js
-const Person = (firstName) => {this.firstName = firstName}
-```
-
-Closures and async functions
-What's going on here - I would expect 3 alerts with 1,2,3 in them but noooooooooo
-```js
-for (var i = 0; i < 3; i++) {
- setTimeout(function callBackFunction() {
- alert(i);
- }, 100);
-}
-```
-
-### Make the above function do what we think it should do.
-
-### Return examples
-```js
-Return values
-function f1(x) {
- this.x = x + 1;
- return;
-}
-
-function f2(x) {
- return this.x = x + 1;
-}
-```
-
-### Static members
-http://odetocode.com/blogs/scott/archive/2015/02/02/static-members-in-es6.aspx
-
-### Closures examples
-https://jsfiddle.net/78dg25ax/?utm_source=website&utm_medium=embed&utm_campaign=78dg25ax
-
-### Why closures are helpful with async code:
-http://stackoverflow.com/questions/13343340/calling-an-asynchronous-function-within-a-for-loop-in-javascript
-
-### Promises
-http://stackoverflow.com/questions/13343340/calling-an-asynchronous-function-within-a-for-loop-in-javascript
-https://www.youtube.com/watch?v=WBupia9oidU
-
diff --git a/fundamentals/loops.md b/fundamentals/loops.md
deleted file mode 100644
index 551df5ee6..000000000
--- a/fundamentals/loops.md
+++ /dev/null
@@ -1,184 +0,0 @@
-# Loops
-
-A loop is a programming construct to perform a repetitive action. Often (but not always) the repetitive action involves accessing or manipulating the individual elements of an array.
-
-We will use the array of month names given below to illustrate the various types of loop constructs available in JavaScript. In the examples we will print out the names of the individual months using a `console.log` statement.
-
-```js
-const months = [
- 'January', 'February', 'March', 'April', 'May', 'June',
- 'July', 'August', 'September', 'October', 'November', 'December'
-];
-```
-
-## while
-
-The `while` loop is probably the simplest one of the bunch. Its general syntax is:
-
-```js
-while (cond) {
- // statement block to be repeated
-}
-```
-
-The loop 'body' (i.e., the statement block including the curly braces) is executed while the condition `cond` holds true. In order for this while loop to execute at least once and to finish in finite time two preconditions must be fulfilled:
-
-1. The condition `cond` should initially hold true.
-2. Some code inside the code block must eventually cause the condition to become false.
-
-Applied to our `months` array the while loop would look like this:
-
-```js
-const months = [
- ...
-];
-
-let index = 0;
-const len = months.length; // 12
-
-while (index < len) {
- console.log(months[index]);
- index += 1;
-}
-```
-
-In this example the two preconditions mentioned earlier are met:
-
-1. The condition `index < len` initially holds true because `index` is initialized to `0` and we know that `len` is fixed at the value of `12` (hence the use of `const` rather than `let`).
-2. Because the value of `index` is incremented by one each time the loop body is executed there will be a point in time when the loop condition becomes false. This will happen when the value `index` has become `12` and `index < len` no longer holds true.
-
-If precondition 2 is **not** met then your loop will execute forever. This is what is commonly referred to as an _infinite loop_. Your code will appear to 'hang' when this happens, and you will need to somehow terminate the program and fix the problem (e.g., press Ctrl-C when running in Node).
-
-More info on MDN: [while](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while)
-
-## do...while
-
-This is a variation of the while loop discussed above. Its general syntax is:
-
-```js
-do {
- // statement block to be repeated
-} while (cond);
-```
-
-The do...while loop is executed at least once, because the loop condition is evaluated at the _end_ of the loop rather than at the _beginning_ as is the case with the regular `while` loop.
-
-Applied to our 'months' example the code would look like this:
-
-```js
-const months = [
- ...
-];
-
-let index = 0;
-const len = months.length;
-
-do {
- console.log(months[index]);
- index += 1;
-} while (index < len)
-```
-
-We recommend that you do not use the `do...while` loop, exactly for the reason that the loop body is executed at least once without taking the loop condition into account. It is always possible to rewrite a `do...while` loop into a regular `while` loop that strictly meets the two preconditions mentioned earlier.
-
-More info on MDN: [do...while](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while)
-
-## for
-
-The `for` loop is the most used loop construct that you will come across and that you are likely to use most in your own code. It exists in a number of variations in JavaScript that we will cover one by one below. The syntax of the most generic form is as follows:
-
-```js
-for ([initialization]; [condition]; [final-expression]) {
- // statement block to be repeated
-}
-```
-
-Let's first look at an example:
-
-```js
-const months = [
- ...
-];
-
-const len = months.length;
-
-for (let index = 0; index < len; index++) {
- console.log(months[index]);
-}
-```
-
-The `for` statement combines three parts of the loop construct in a single statement. Those three parts are separated by semicolons and, enclosed within parentheses, directly follow the `for` keyword.
-
-1. The first part is the for loop initialization of a loop 'index' variable, here called `index`. (Often you will see one letter variable names, such as `i` for the loop index.). This part is executed only once.
-2. The second part is the loop condition, and is evaluated for every loop [iteration](http://www.dictionary.com/browse/iteration). The loop body is executed while this condition holds true. Note that this condition is tested at the beginning of the loop (like `while` above) and **not** at the end (like `do...while`).
-3. The last part is where the loop index variable is updated, in this case incremented by one (`index++` is short for `index += 1`, which in itself is short for `index = index + 1`). This update is effectively done at the end of the loop (in the example, after the console.log has been executed).
-
-This form of the `for` loop is roughly equivalent1 to the following:
-
-```js
-// for (let index = 0; index < len; index++) {
-// ↑A ↑B ↑C
-
-let index = 0; // ← A
-while (index < len) { // ← B
- console.log(months[index]);
- index++; // ← C
-}
-```
-
-1 In this `while` loop version, the `index` variable is accessible both inside and outside of the loop body (i.e., the code block inside the curly braces). In the case of an equivalent `for` loop, the scope of the index variable depends on whether it is declared with `let` or `var`. See this [article from Web Bos](http://wesbos.com/for-of-es6/) for details.
-
-More info on MDN: [for](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for)
-
-## for...of
-
-The `for...of` loop construct is relatively new and very well suited for use with arrays. It was introduced with the ES6 variant of JavaScript. Its general syntax is:
-
-```js
-for (variable of iterable) {
- // statement block to be repeated
-}
-```
-
-Here, `iterable` can be a couple of things, but most of the time it is just an array variable. Let's again look at an example.
-
-```js
-const months = [
- ...
-];
-
-for (const month of months) {
- console.log(month);
-}
-```
-
-With this `for` loop variant, the array is considered a collection of elements (you can _iterate_ through a collection: it is 'iterable'). Each time the loop body is executed the loop variable receives the next value of the array (in the example, starting with `'January'` and ending with `'December'`).
-
-This now allows us to write very elegant and short code. No need to mess around with a loop index variable, array lengths etc. If you need to use a `for` loop involving arrays, this will often be your first choice.
-
-More on MDN: [for...of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of)
-
-## for..in
-
-This loop variant is for use with JavaScript objects only. It existed before the `for...of` loop variant became available.
-
-We will discuss the `for...in` variant in more detail the part of the curriculum where we deal with Objects. Here, we will suffice to say that the `for...in` loop construct can easily be rewritten as a `for...of` loop, as follows:
-
-```js
-const obj = {
- a: 10,
- b: 'test'
-}
-
-// for...in
-for (const key in obj) {
- console.log(obj[key])
-}
-
-// equivalent for...of
-for (const key of Object.keys(obj)) {
- console.log(obj[key])
-}
-```
-
-More info on MDN: [for...in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in)
diff --git a/fundamentals/map_filter.md b/fundamentals/map_filter.md
deleted file mode 100644
index 3f5961a0b..000000000
--- a/fundamentals/map_filter.md
+++ /dev/null
@@ -1,240 +0,0 @@
-# Map, filter
-
-The array methods **map()** and **filter()** are best understood by looking at how they could be implemented if we were to write them ourselves. In the next few sections we will present simplified versions of the native implementations. We have prefixed the method names with `my` to distinguish them from the built-in versions.
-
-Each of the three methods use a `for` loop internally. You will notice that once you start using these methods the need for `for` loops in your own code is greatly reduced (hurray!).
-
-## Array#map()\*
-
-The **map** method returns a new array where each element of the subject array is transformed by a user-supplied transformation (= _mapping_) function.
-
-```js
-Array.prototype.myMap = function (mapFn) {
- const arr = [];
- for (let i = 0; i < this.length; i++) {
- arr.push(mapFn(this[i], i, this));
- }
- return arr;
-};
-```
-
-\* Array#map is a short-hand notation for Array.prototype.map.
-
-Because the **map()** method is called on an array (using dot-notation), the value of `this` refers to that array itself (in this review called the _subject_ array).
-
-Internally, the **map()** method initializes a new, empty array to which it will push transformed elements, one by one, as it iterates through the subject array, calling the `mapFn` function for each individual element. When the loop has been completed, the new array is returned. Note that the subject array itself remains unmodified.
-
-`this[i]` refers to an element of the subject array at loop index 'i' (because `this` is a reference to the subject array).
-
-As you can see, the `mapFn` function is called with three arguments:
-
-1. the current array element to be transformed
-2. the index of the element (starting with `0`)
-3. the subject array itself
-
-In the example below we will use the Array#map method to create a new array that holds the squares of a subject array of numbers. The mapping function is represented by an ES6 fat arrow function: `num => num * num`
-
-```js
-const numbers = [3, 5, 2, 7];
-const squares = numbers.map(num => num * num);
-console.log(squares); // -> [9, 25, 4, 49]
-```
-
-For illustrative purposes we can add a `console.log`† statement to our mapping function and see what we get passed as second and third argument:
-
-```js
-const numbers = [3, 5, 2, 7];
-const mapFn = (num, index, arr) => {
- console.log(num, index, arr);
- return num * num;
-}
-const squares = numbers.map(mapFn);
-console.log('squares', squares)
-```
-
-Output:
-
-```js
-3 0 [ 3, 5, 2, 7 ]
-5 1 [ 3, 5, 2, 7 ]
-2 2 [ 3, 5, 2, 7 ]
-7 3 [ 3, 5, 2, 7 ]
-squares [ 9, 25, 4, 49 ]
-```
-
-For each of the first four lines in the output (from the `console.log` inside the `for` loop) the first number is the value of the current element, the second number is the current loop index value and the array value is the original subject array.
-
-As is usual in JavaScript you do not necessarily have to use all the parameters that were passed to the `mapFn` function. In fact, in many cases you will only need the first argument (the current array element) as we saw in the first example.
-
-†You should normally not use `console.log` inside the function you pass to the `map` (or `filter`) method. These functions should also **not modify** any variables outside their own function scope, although they can reference these variables for read-only purposes. In computer science terms, these functions should be [pure with no 'side-effects'](https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-pure-function-d1c076bec976).
-
-## Array#filter()
-
-The **filter()** method returns a new array with all elements that pass the test implemented by a user-supplied (predicate\*) function.
-
-```js
-Array.prototype.myFilter = function (predicateFn) {
- const arr = [];
- for (let i = 0; i < this.length; i++) {
- if (predicateFn(this[i], i, this)) {
- arr.push(this[i]);
- }
- }
- return arr;
-};
-```
-
-\*A predicate is a function that returns a boolean, whose value depends on its supplied arguments.
-
-This method works in a similar fashion as the **map()** method, but now elements are only pushed to the new array if the predicate function returns `true`.
-
-In the example below the predicate function test whether the current element is even by checking whether its value divided by two has a remainder of zero. The result of this comparison (`true` or `false`) is the return value of the predicate and determines whether the current element gets added to the new array or not.
-
-```js
-const numbers= [6, 3 , 10, 1];
-const evenNumbers = numbers.filter(num => num % 2 === 0);
-console.log(evenNumbers); // -> [6, 10]
-```
-
-## Bonus: Array#reduce()
-
-Of the three methods **map**, **filter** and **reduce**, the **reduce** method presents the most difficulty for new learners. At present the **reduce** method is not covered in the HackYourFuture curriculum, nor required in the homework. It is nevertheless included in here for completeness.
-
-The _Mozilla Developer Network_ (MDN) web site gives the following definition:
-
-> The reduce() method applies a function against an accumulator and each element in the array (from left to right) to reduce it to a single value\*\*.
-
-\*\*Although reference is made to a 'single value', this single value may well be an array or an object, as you will see later in the examples below.
-
-```js
-Array.prototype.myReduce = function (reducerFn, initialValue) {
- let accumulator = initialValue;
- for (let i = 0; i < this.length; i++) {
- accumulator = reducerFn(accumulator, this[i], i, this);
- }
- return accumulator;
-};
-```
-
-The key to understanding the **reduce()** method is in the line:
-
-```js
-accumulator = reducerFn(accumulator, this[i], i, this);
-```
-
-In the case we don't need the current loop index and the subject array in the reducer function (which is often the case), we can simplify this to:
-
-```js
-accumulator = reducerFn(accumulator, this[i]);
-```
-
-From this line we can define the reducer function as a function that takes an accumulator value and the current array element and returns a new accumulator value.
-
-The **reduce()** method is the most flexible of the map/filter/reduce triplet. In fact, it is possible to rewrite **map()** and **filter** using **reduce()**.
-
-### Using reduce() to filter
-
-```js
-const arr = [6, 3, 10, 1];
-const evenNumbers = arr.reduce((acc, elem) => {
- if (elem % 2 === 0) {
- acc.push(elem);
- }
- return acc;
-}, []);
-console.log(evenNumbers); // -> [6, 10]
-```
-
-In this example our accumulator is an (initially empty) array. We put elements (in this case integer numbers) in the accumulator only when they are divisible by 2.
-
-### Using reduce() to map
-
-In this example an array of integer numbers is mapped to an array of their squares.
-
-```js
-const arr = [6, 3, 10, 1];
-const squares = arr.reduce((acc, elem) => {
- acc.push(elem * elem);
- return acc;
-}, []);
-console.log(squares); // -> [36, 9, 100, 1]
-```
-
-## Using reduce() to 'group by'
-
-In this example our accumulator is not an array, but an (initially empty) object. It groups the array elements by gender.
-
-```js
-const arr = [
- { gender: 'F', name: 'Joyce'},
- { gender: 'M', name: 'Jim' },
- { gender: 'F', name: 'Lucy' },
- { gender: 'M', name: 'Ferdinand' }
-];
-const groupedNames = arr.reduce((acc, elem) => {
- if (acc[elem.gender]) {
- acc[elem.gender].push(elem);
- } else {
- acc[elem.gender] = [elem];
- }
- return acc;
-}, {});
-console.log(groupedNames);
-```
-
-Result:
-
-```js
-{
- F: [
- { gender: 'F', name: 'Joyce' },
- { gender: 'F', name: 'Lucy' }
- ],
- M: [
- { gender: 'M', name: 'Jim' },
- { gender: 'M', name: 'Ferdinand' }
- ]
-}
-```
-
-### Method chaining
-
-The methods **map()** and **filter()** each return a new array. This makes it possible to chain these methods and create a 'pipeline' of operations, to be applied in sequence. The **reduce** method can return anything, including an array. If a **reduce** method returns something other than an array it can only be included at the end of an array method chain.
-
-Let's take the last example, but now filtering out only those array elements for which the name starts with a 'J':
-
-```js
-const arr = [
- { gender: 'F', name: 'Joyce' },
- { gender: 'M', name: 'Jim' },
- { gender: 'F', name: 'Lucy' },
- { gender: 'M', name: 'Ferdinand' }
-];
-const groupedNames = arr
- .filter(elem => elem.name.startsWith('J'))
- .reduce((acc, elem) => {
- if (acc[elem.gender]) {
- acc[elem.gender].push(elem);
- } else {
- acc[elem.gender] = [elem];
- }
- return acc;
- }, {});
-console.log(groupedNames);
-```
-
-Result:
-
-```js
-{
- F: [{ gender: 'F', name: 'Joyce' }],
- M: [{ gender: 'M', name: 'Jim' }]
-}
-```
-
-## In summary
-
-
-
-Credit: http://www.globalnerdy.com/2016/06/23/map-filter-and-reduce-explained-using-emoji/
-
diff --git a/fundamentals/naming_conventions.md b/fundamentals/naming_conventions.md
deleted file mode 100644
index 5f93d8b4b..000000000
--- a/fundamentals/naming_conventions.md
+++ /dev/null
@@ -1,97 +0,0 @@
-# Naming conventions
-
-## Background
-
-In programming you will need to come up with appropriate names for your variables, functions and function parameters.
-
-> _The most important consideration in naming a variable is that the name fully and accurately describes the entity the variable represents. An effective technique for coming up with a good name is to state in words what the variable represents. Often that statement itself is the best variable name. It’s easy to read because it doesn’t contain cryptic abbreviations, and it’s unambiguous. Because it’s a full description of the
-entity, it won’t be confused with something else. And it’s easy to remember because the name is similar to the concept._
-
-> Source: [Code Complete 2, Steve McConnell](https://www.amazon.de/Code-Complete-Practical-Construction-Costruction/dp/0735619670)
-
-The names you choose are for the benefit of the human consumer of your code. Foremost this human consumer will be you yourself: when writing code carefully chosen names help you to stay focussed on the business problem you are trying to solve. When the need arises to revisit your code in the future, carefully chosen names will help you to reconstruct your state of mind at the time you originally wrote the code.
-
-In practice your code may need to be maintained by others, as you move on to other projects or jobs. For the developers doing maintenance, it is even more important to use carefully chosen names, as they do not have the benefit of having gone through your thought processes.
-
-The consumer least interested in the names you choose is the runtime environment (i.e. the JavaScript engine in your browser or Node). The runtime environment does not mind meaningless, one-letter variable names. In fact, a process called 'minification' is sometimes used to create a minified version of your JavaScript code for running in the browser, the purpose of which is to speed up fetching your code over the Internet.
-
-## camelCase vs PascalCase vs snake_case
-
-These terms are used to describe the conventions for the spelling of multi-word variable (and function) names.
-
-### camelCase
-
-In JavaScript the convention is to spell the names of variables that contain data using _camelCase_, i.e. the first word in the variable name should start with a lower case letter and each subsequent word with an an upper case letter. It is called _camelCase_ because the hump in the middle of the word has some similarity with the hump of a camel.
-
-Example:
-
-```js
-let myFavouriteMovies;
-```
-
-### PascalCase
-
-This casing is restricted in JavaScript to class names and constructor functions. This style of casing was customary in the Pascal programming language.
-
-Example:
-
-```js
-class Movie {
- ...
-}
-```
-
-### snake_case
-
-This casing is not generally used in JavaScript except for naming global constants. In this case the variable name should be completely in upper case.
-
-```js
-const MAX_AGE = 60;
-```
-
-
-## Variable names for data
-
-Variables that contain data should be named using noun phrases, i.e. have a noun as its head word. The name should be in camelCase. Example:
-
-```js
-let myFavouriteMovie;
-```
-
-If the data consists of a single item the noun should be in singular form as in the example above. If the data consists of a collection, such as a JavaScript array or a JavaScript object that is used as a keyed collection then a plural form should be used:
-
-```js
-let myFavouriteMovies;
-```
-
-Sometimes a mass noun is used as head word instead of an explicit plural form for naming a collection. Examples of mass nouns are `data`, `input`, `money`.
-
-## Function names
-
-Function names (exception: constructor functions, see below) should generally start with a verb to indicate the _action_ performed by the function. The name should be in camelCase. Example:
-
-```js
-function fetchMovie() {
- ...
-}
-```
-
-## Constructor functions and class names
-
-The naming convention for constructor functions, i.e. functions that are used in conjunction with the `new` keyword, and ES6 class names is to use a noun phrase in PascalCase. Example:
-
-```js
-class Movie {
- ...
-}
-```
-
-## Reserved keywords
-
-Certain names are reserved by JavaScript for its own use. You cannot use the names for your variable. For example, you can't name a variable `if`.
-
-For a complete list of reserved names, see the MDN page for [Keywords](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords).
-
-
-
-
diff --git a/fundamentals/objects.md b/fundamentals/objects.md
deleted file mode 100644
index 381cbaadc..000000000
--- a/fundamentals/objects.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Objects
-
-Variables that are objects also contain a list of things, but instead of them being in some specific order, they can be assigned to words, called "keys". Instead of "elements" the things that are inside objects are called "properties".
-
-
-```js
-let obj = {name: 'John', age: 24};
-```
-
-This object has two properties: `name` and `age`. The "value" of the property `name` is the string `'John'`. The "value" of the property `age` is the number `24`.
-
-When accessing object properties, you can use the dot-notation: `obj.name` or the bracket-notation: `obj["name"]`. Note that the latter looks a lot like the way to access array elements. However, here what's inside the bracket (called "key" for objects, instead of "index") must be a string.
-
-```js
-console.log(obj.name); // -> 'John'
-console.log(obj['name']); // -> 'John'
-```
-
-Just like with arrays, you can also use a variable to access properties, as long as these variables are strings. In this case you cannot use the dot-notation!
-
-```js
-const ageKey = 'age';
-console.log(obj[ageKey]); // -> 24
-```
-
-Remember that there is a very big difference between `obj[name]` and `obj["name"]`.
-
-> Note:
->
-> Thinking back of arrays, the length of an array can be retrieved by `arr.length`. So as mentioned before, arrays are just like other JavaScript objects. You could even write `arr['length']` to access the `length` property of the array. JavaScript will look: is what we put between brackets a number? Then it is an index and we'll look up the correct array element. If it's a string, it's a key and we will look up the corresponding property.
diff --git a/fundamentals/oop_classes.md b/fundamentals/oop_classes.md
deleted file mode 100644
index 878c914fa..000000000
--- a/fundamentals/oop_classes.md
+++ /dev/null
@@ -1,344 +0,0 @@
-# Object-Oriented Programming & Classes
-
-### Object Literals and Imperative Programming
-
-In earlier JavaScript lectures we saw that we can create objects through object literals and use functions to access and manipulate their properties. A typical example is shown below, where we have defined an array of objects, in this case each representing the name of a month and its associated number of days.
-
-We're looping through the months and printing an informational message to the console for each month having 31 days.
-
-This style of programming is called Imperative Programming: in the code detail containing the `for` loop we instruct the computer _how to perform the task(s) at hand_.
-
-```js
-const months = [
- { name: 'January', days: 31 },
- { name: 'February', days: 28 },
- { name: 'March', days: 31 },
- { name: 'April', days: 30 },
- { name: 'May', days: 31 },
- { name: 'June', days: 30 },
- { name: 'July', days: 31 },
- { name: 'August', days: 31 },
- { name: 'September', days: 30 },
- { name: 'October', days: 31 },
- { name: 'November', days: 30 },
- { name: 'December', days: 31 }
-];
-
-for (const month of months) {
- if (month.days === 31) {
- console.log(`${month.name} has ${month.days} days.`);
- }
-}
-```
-
-## Functional Programming
-
-In the Functional Programming style (also referred to as Declarative Programming), we prefer to declare _what the computer should do_.
-
-In the next example we have used the `filter` method to extract a subset of months having 31 days, used the `map` method to create an informational string for each month and a `forEach` method to output those strings to the console.
-
-Put in other words, we state or **declare** that the computer should **filter** our array according to some predefined criterion, then **map** each filtered object to a string and print out each string to the console.
-
-> A prime example of a declarative language is SQL, which you will learn in the HYF Database module.
-
-In contrast to the Imperative Style we do not have to infer from looking at the code what is actually happening. Instead, the names of the functions and methods already indicate what it is we want to achieve.
-
-```js
-const months = [
- { name: 'January', days: 31 },
- { name: 'February', days: 28 },
- { name: 'March', days: 31 },
- { name: 'April', days: 30 },
- { name: 'May', days: 31 },
- { name: 'June', days: 30 },
- { name: 'July', days: 31 },
- { name: 'August', days: 31 },
- { name: 'September', days: 30 },
- { name: 'October', days: 31 },
- { name: 'November', days: 30 },
- { name: 'December', days: 31 }
-];
-
-months
- .filter(month => month.days === 31)
- .map(month => `${month.name} has ${month.days} days.`)
- .forEach(string => console.log(string));
-```
-
-### Constructor Functions (pre-ES6) and the `new` keyword
-
-In the example below, instead of using object literals, we use a function in conjunction with the `new` keyword to create objects. Such a function is called a **constructor** function, and, by convention, we start its name with an uppercase letter.
-
-When a function is called and preceded by the `new` keyword, something special happens. The JavaScript engine creates a new, empty object and assigns that object to the `this` variable.
-
-> The `this` variable is always present in JavaScript. Its value is dependent on the current execution context. Most of the time, the value of `this` is `undefined`. However, when calling a method on an object, the `this` variable holds a reference to the object it is called on. We can use the `this` variable inside the method implementation to get at other properties and methods within the object.
-
-We can now add properties to the new object through the `this` variable, as shown below.
-
-When the constructor function finishes, it returns the newly constructed object as its return value.
-
-```js
-function Month(name, days) {
- this.name = name;
- this.days = days;
-}
-
-const months = [
- new Month('January', 31),
- new Month('February', 28),
- new Month('March', 31),
- new Month('April', 30),
- new Month('May', 31),
- new Month('June', 30),
- new Month('July', 31),
- new Month('August', 31),
- new Month('September', 30),
- new Month('October', 31),
- new Month('November', 30),
- new Month('December', 31)
-];
-
-months
- .filter(month => month.days === 31)
- .map(month => `${month.name} has ${month.days} days.`)
- .forEach(string => console.log(string));
-```
-
-- [Understanding JavaScript Function Invocation and "this"](http://yehudakatz.com/2011/08/11/understanding-javascript-function-invocation-and-this/), by Yehuda Katz.
-
-- StackOverflow: [What is the 'new' keyword in JavaScript?](https://stackoverflow.com/questions/1646698/what-is-the-new-keyword-in-javascript)
-
-### Introducing Object-Oriented Programming
-
-In the preceding example, there was not much to be gained from using a constructor function in conjunction with the `new` keyword, as compared to just using object literals. The advantages become more clear when we start to add **methods** to the object. Methods are just plain JavaScript functions that you call on an object, using dot notation. In the code snippet below, we have defined a couple of functions and assigned them to object properties through the `this` variable in the constructor function. This makes these functions into methods.
-
-```js
-function Month(name, days) {
- this.name = name;
- this.days = days;
-
- this.hasDays = function (days) {
- return this.days === days;
- };
-
- this.isLongMonth = function () {
- return this.hasDays(31);
- };
-
- this.toString = function () {
- return `${this.name} has ${this.days} days.`;
- };
-
- this.toConsole = function () {
- console.log(this.toString());
- };
-}
-
-const months = [
- new Month('January', 31),
- new Month('February', 28),
- new Month('March', 31),
- new Month('April', 30),
- new Month('May', 31),
- new Month('June', 30),
- new Month('July', 31),
- new Month('August', 31),
- new Month('September', 30),
- new Month('October', 31),
- new Month('November', 30),
- new Month('December', 31)
-];
-
-months
- .filter(month => month.isLongMonth())
- .forEach(month => month.toConsole());
-```
-
-We can now call these methods using dot notation, as in:
-
-```js
-month.isLongMonth()
-month.toConsole()
-```
-
-We have already seen this notation when we used, for instance, `map` and `filter`.
-
-When we add methods to an object to operate on data contained in the object, we have created a more or less self-contained object. The object knows how to operate its data and external code need not know anything about its internals. This concept is known as Object-Oriented Programming. It is the default style of programming in object-oriented languages such as Java, C# and C++. In JavaScript it is optional. In the HYF React module, ES6 classes are used extensively.
-
-### Prototypes
-
-The code from the previous example has a significant inefficiency: each object get its own copy of the methods (`hasDays` etc). This takes up unnecessary memory. It would be far better if the objects could share a common set of methods. This is where JavaScript's concept of a `prototype` comes in.
-
-Each JavaScript function has a `prototype` property that points to an, initially empty, prototype object. It only comes into play when using that function as a **constructor** function. We can assign functions to this prototype which are shared by all objects we create through calling the constructor function in combination with the `new` keyword.
-
-```js
-function Month(name, days) {
- this.name = name;
- this.days = days;
-}
-
-Month.prototype.hasDays = function (days) {
- return this.days === days;
-};
-
-Month.prototype.isLongMonth = function () {
- return this.hasDays(31);
-};
-
-Month.prototype.toString = function () {
- return `${this.name} has ${this.days} days.`;
-};
-
-Month.prototype.toConsole = function () {
- console.log(this.toString());
-}
-
-const months = [
- new Month('January', 31),
- new Month('February', 28),
- new Month('March', 31),
- new Month('April', 30),
- new Month('May', 31),
- new Month('June', 30),
- new Month('July', 31),
- new Month('August', 31),
- new Month('September', 30),
- new Month('October', 31),
- new Month('November', 30),
- new Month('December', 31)
-];
-
-months
- .filter(month => month.isLongMonth())
- .forEach(month => month.toConsole());
-```
-
-
-
-
-### Prototype vs \_\_prototype\_\_
-
-The above diagram depicts how this sharing works out.
-
-The `prototype` property exists on all functions but is only relevant when that function is used as a **constructor function**. By assigning methods to the `prototype` property you are basically defining a ‘prototype’ object that will be shared by all objects created through the constructor function when called in conjunction with the `new` keyword.
-
-In contrast to `prototype`, the `__proto__` property (in documentation sometimes denoted as `[[proto]]`) is a property that exist on objects created through the constructor function. This `__proto__` property points to the shared ‘prototype’ object, as defined on the constructor function’s `prototype` property.
-
-The prototype object itself also has a `__proto__` property. In most cases this property points to the prototype of the standard JavaScript `Object` prototype. This is because, ultimately, all objects in JavaScript are prototype-linked to the `Object` prototype. In OOP terms one would say that all JavaScript objects ultimately derive from `Object`.
-
-The `__proto__` property of the `Object` prototype itself has the value `null`. This signals the end of the prototype chain.
-
-When you call a method on an object that does not exist on the object itself, the JavaScript engine will 'walk' down the prototype chain until it finds the requested method _or_ until it reaches the end of the chain.
-
-If the method is found, JavaScript calls the method, setting its `this` value to the object the method was called on. This happens behind the scenes without requiring intervention from the programmer.
-
-If the method was not found by walking the prototype chain, a run-time error is produced, e.g:
-
-```js
-myObj.someNonExistingMethod();
-
-```
-
-```
-myObj.someNonExistingMethod();
- ^
-
-TypeError: myObj.someNonExistingMethod is not a function
-```
-
-### ES6 Classes
-
-In ES6 a new way of defining objects and its methods was introduced. It uses the same `prototype` mechanism behind the scenes, but its syntax is closer to that of other object-oriented languages, such as Java, etc. Because it is only new syntax, hiding the intricacies of the `prototype`, it is often designated as 'syntactic sugaring'.
-
-In ES6 classes we use the `class` keyword to define a class. The `constructor` method takes the place of the constructor function of the previous examples.
-
-We define methods by creating functions inside the class body, however without the `function` keyword. As previously, the `this` keyword refers to the object that a method is called upon.
-
-```js
-class Month {
- constructor(name, days) {
- this.name = name;
- this.days = days;
- }
-
- hasDays(days) {
- return this.days === days;
- }
-
- isLongMonth() {
- return this.hasDays(31);
- }
-
- toString() {
- return `${this.name} has ${this.days} days.`;
- }
-
- toConsole() {
- console.log(this.toString());
- }
-}
-
-const months = [
- new Month('January', 31),
- new Month('February', 28),
- new Month('March', 31),
- new Month('April', 30),
- new Month('May', 31),
- new Month('June', 30),
- new Month('July', 31),
- new Month('August', 31),
- new Month('September', 30),
- new Month('October', 31),
- new Month('November', 30),
- new Month('December', 31)
-];
-
-months
- .filter(month => month.isLongMonth())
- .forEach(month => month.toConsole());
-```
-
-
-### Bonus: Array.prototype.map & Array.prototype.filter Implementations
-
-Now that we know a bit more about objects, prototypes and the `this` variable, it might be useful to revisit the `map` and `filter` methods we used before and examine how they might be implemented internally.
-
-In the examples below, we have defined alternative implementations for `map` and `filter` and named them `myMap` and `myFilter`. If we run this code we are actually adding these methods to the existing `Array` constructor function (in general, it is a bad idea to modify standard JavaScript objects, but we use it here for illustrative purposes).
-
-The `this` variable inside the method implementations refer to the array (which is technically an object: `typeof arr === 'object'`) on which the method is called.
-
-As you can see, both methods use a `for` loop internally, saving us the trouble of writing a `for` loop ourselves. Both methods call a callback that was passed as a parameter. The callback, in its turn, is called for every loop iteration with three parameters, viz:
-
-1. The current array element
-2. The current loop index value
-3. The complete array itself
-
-For the `map` method, the value that we return from our callback is pushed onto a new, initially empty array.
-
-For the `filter` method, the current element is pushed unmodified to a new, initially empty array if, and only if our callback returns a 'truthy' value.
-
-Finally, both methods return the newly constructed array as their return value.
-
-```js
-Array.prototype.myMap = function (callback) {
- const arr = [];
- for (let i = 0; i < this.length; i++) {
- arr.push(callback(this[i], i, this));
- }
- return arr;
-};
-```
-
-
-```js
-Array.prototype.myFilter = function (callback) {
- const arr = [];
- for (let i = 0; i < this.length; i++) {
- if (callback(this[i], i, this)) {
- arr.push(this[i]);
- }
- }
- return arr;
-};
-```
-
diff --git a/fundamentals/operators.md b/fundamentals/operators.md
deleted file mode 100644
index 51d78c4ed..000000000
--- a/fundamentals/operators.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# Operators
-
-## Comparison operators
-
->Note the two different uses of the equals sign:
-A single equals sign (=) is used to assign a value to a variable.
-A triple equals sign (===) is used to compare two values (see Equality Operators).
-
-### Equality operators
-
-* Equality `==`
-* Inequality `!=`
-* Identity / strict equality `===` (preferred)
-* Non-identity / strict inequality `!==` (preferred)
-
-How does this work in practice?
-
-```js
-1 == 1 // -> true
-7 == '7' // -> true
-1 != 2 // -> true
-5 === 5 // -> true
-9 === '9' // -> false
-3 !== 3 // -> false
-3 !== '3' // -> true
-```
-
-> why does `7 == '7'` returns true and `9 === '9'` returns false?
-
-We strongly recommend that you always use the strict form when comparing for equality (`===`) or inequality (`!==`). Use the non-strict forms only when there is a compelling reason to do so (you will be hard pressed to find such a reason).
-
-### Relational operators
-
-* Greater than operator `>`
-* Greater than or equal operator `>=`
-* Less than operator `<`
-* Less than or equal operator `<=`
-
-```js
-4 > 3 // -> true
-3 >= 3 // -> true
-13 < 12 // -> false
-3 <= 4 // -> true
-```
-
-More about [comparison operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)
-
-## Arithmetic operators
-
-* Addition `+`
-* Subtraction `-`
-* Multiplication `*`
-* Division `/`
-* Remainder (sometimes called modulo) `%`
- Returns the remainder left over after you've shared the left number out into a number of integer portions equal to the right number.
-
-```js
-8 + 9 // -> 17, adds two numbers together.
-20 - 12 // -> 8, subtracts the right number from the left.
-3 * 4 // -> 12, multiplies two numbers together.
-10 / 5 // -> 2, divides the left number by the right.
-8 % 3 /// -> 2, as three goes into 8 twice, leaving 2 left over.
-```
-
-More about [Arithmetic operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#.25_.28Modulus.29)
-
-## Logical operators
-
-* AND `&&`
-* OR `||`
-
-```js
-true && false //-> false
-false && true //-> false
-false || true //-> true
-true || false //-> true
-```
-
-Given that x = 6 and y = 3
-```js
-x < 10 && y > 1 // -> true
-x === 5 || y === 5 // -> false
-x !== y // -> true
-```
-
-Logical NOT
-
-* NOT `!`
-
-```js
-true === !false
-false === !true
-```
-
-More about [logical operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators)
-
-### typeof operator
-
-To get the type of a value assigned to a variable, use the following code:
-
-```js
-let bar = 42;
-typeof bar //-> 'number'
-typeof typeof bar; //-> 'string'
-```
-
-So the data type of what `typeof` returns is always a string, bar on the other hand is still a number.
-
-## Assignment operators
-
-In addition to the simple assignment operator `=` there are also compound assignment operators such as `+=`. The following two assignments are equivalent:
-
-```js
-x += 1;
-x = x + 1;
-```
-
-|Operator| Example| Same As|
-|:------:|:--------:|:-------:|
-|`=` | `x = y` | `x = y`|
-|`+=`| `x += y` | `x = x + y`|
-|`-=`| `x -= y` | `x = x - y`|
-|`*=`| `x *= y` | `x = x * y`|
-|`/=`| `x /= y` | `x = x / y`|
-|`%=`| `x %= y` | `x = x % y`|
diff --git a/fundamentals/promises.md b/fundamentals/promises.md
deleted file mode 100644
index 25a333248..000000000
--- a/fundamentals/promises.md
+++ /dev/null
@@ -1,166 +0,0 @@
-# Promises
-
-Listing 1 shows an example based on an asynchronous XMLHttpRequest that we will use throughout this discussion.
-
-```js
-function getJSON(url) {
- return new Promise((resolve, reject) => {
- const xhr = new XMLHttpRequest();
- xhr.open('GET', url);
- xhr.responseType = 'json';
- xhr.send();
- xhr.onload = () => {
- if (xhr.status < 400) {
- resolve(xhr.response);
- } else {
- reject(new Error(xhr.statusText));
- }
- };
- xhr.onerror = () => reject(new Error(xhr.statusText));
- });
-}
-
-// alternative:
-const fetchJSON = url => fetch(url).then(res => res.json());
-
-// ...
-
-getJSON(url)
- .then(data => renderData(data))
- .catch(err => renderError(err));
-```
-
-Listing 1. Asynchronous `XMLHttpRequest` (and `fetch` alternative) using a promise.
-
-The `getJSON()` function in Listing 1 returns a `promise` that resolves to some value converted from JSON data received from some remote API end point. The `fetchJSON()` function does the same, using a more modern browser Web API.
-
-## What is a promise?
-
-Why is a JavaScript ES6 `promise` called a 'promise'? Here is a snippet from the *Oxford Dictionary of English* definition of 'promise':
-
-> **promise** |ˈprɒmɪs|
-noun
-1 a declaration or assurance that one will do something or that a particular thing will happen
-
-This pretty well sums up what a promise means in JavaScript: something that will be delivered in the future (if and when the promise is *fulfilled*).
-
-Traditionally, *callbacks* are used as a way to receive the data that is delivered asynchronously (meaning that the data is not likely to be available at the time it is requested but can be expected 'to happen' some time later). Using callbacks can quickly become unwieldy when dealing with many asynchronous events (e.g., ajax calls), especially when they depend on each other (google for *callback hell*).
-
-JavaScript ES6 introduces promises as a better alternative for callbacks when dealing with asynchronous events.
-
-We can state a number of simple facts about ES6 promises:
-
-- A promise is a JavaScript object (`typeof somePromise === 'object'`) that serves as a placeholder for a (future) value.
-- Because a promise is an ordinary JavaScript object you can pass it around as an argument to a function, return it from a function, assign it to a variable, push it to an array, etc.
-- You can create one yourself by calling the ES6 `Promise` constructor function with `new` (as we're doing in Listing 1 above), then call `resolve` when results are ready or `reject` on detecting an error.
-- Sometimes you can get a ready-made promise by calling an appropriate API or library function, like the `fetch` Web API function in Listing 1.
-- Internally, a promise can be in one of three states:
- - **pending**: the asynchronous result is still awaiting delivery
- - **fulfilled**: the asynchronous result has been delivered and ready (`resolve` was called)
- - **rejected**: an error was encountered: the promise could not be fulfilled (`reject` was called)
-- A promise that is no longer pending because it was either fulfilled to rejected is said to be _settled_.
-- A promise that is _settled_ has reached its final state. Its state and value can no longer be changed. It has become _immutable_.
-
-## The .then() method
-
-A promise exposes a `.then()` method through which you can obtain its fulfilled value or an error value in the case the promise was rejected:
-
-```js
-somePromise.then(onFulfilled, onRejected)
-```
-
-The `.then()` method takes as its parameters two **optional** functions, the first one dealing with the 'happy' scenario (the promise is fulfilled) and the second one dealing with the error case (the promise is rejected). If you are only interested in the success case you can leave out the second parameter:
-
-```js
-somePromise.then(onFulfilled)
-```
-
-If you are only interested in the error case, you can pass `null` for the first callback:
-
-```js
-somePromise.then(null, onRejected)
-```
-
-or you can use another method available on a promise, `.catch()`, which is just a shorthand for calling `then()` with `null` as its first argument:
-
-```js
-somePromise
- .then(onFulfilled)
- .catch(onRejected)
-```
-
-> Note that `onFulfilled` and `onRejected` execute asynchronously, after the [event loop](./event_loop.md) turn in which then is called, and with a fresh stack.
-
-It is also important to understand that the `.then()` method returns a new promise that resolves to the return value of `onFulfilled` (if specified) in case of the 'happy' scenario or the return value of `onRejected` (if specified) in case of an error. If the return value of these functions is a plain JavaScript value, the new promise is immediately fulfilled with that value. If the return value is yet another promise then the outcome is determined by the inner promise, once settled. If the function does not return a value, the new promise is immediately fulfilled with the value `undefined`.
-
-Because `.then()` (and `.catch`) return new promises, you can chain them together such that your code can be read as: do *this*, then do *that* and then *that*, etc.:
-
-```js
-getJSON(url)
- .then(data => {
- const innerPromise = getJSON(otherUrl)
- .then(otherData => {
- renderData(data);
- renderOtherData(otherData);
- });
- return innerPromise;
- })
- .catch(err => {
- renderError(error)
- });
-```
-
-Listing 2. Chaining of `then` and `catch`
-
-Let's examine Listing 2 in a bit more detail. There two calls to `getJSON()`. Errors are to be handled in one place, by means of the `.catch()` method that terminates the promise "chain".
-
-If you embed another promise inside the function that you pass to the `.then()` method you should return that promise as the function's return value. If you don't return the promise, there is no way for the `.catch()` at the end of the chain to "see" a `reject()` of the inner promise, leaving the rejection unhandled.
-
-Note the expression assigned to the `innerPromise` variable. The `getJSON()` function returns a promise, but the `.then()` method chained to `getJSON()` also returns a promise (resolved to the value `undefined` because no value is returned). Therefore `innerPromise` is indeed a promise. In this case we are not interested in the value it resolves to (which is `undefined` as we saw), only in the fact that the promise is resolved (i.e. the async operation we were waiting for has been completed).
-
-In case a promise in the chain is rejected due to some error, the promise chain will be traversed until an `onRejected` handler (e.g., in a terminating `.catch()` method) is found. All intermediate `onFulfilled` handlers (e.g. `.then()`) will be skipped*.
-
-Handling errors at the end of a promise chain is a major advantage over the repetition of error handling code in the case of callbacks.
-
-Note however that a `.catch()` method does not necessarily have to be the last method in the chain. It can be used to handle errors midway. As mentioned previously, the `.catch()` method returns a new promise which can be used to provide some "fallback" value in case of errors.
-
-In the example below a promise is created that (for the purpose of demonstration) is immediately rejected. The promise is subsequently "consumed" twice.
-
-1. In the first case ('consumer 1'), the rejection is caught by a `.catch()` method and the rejection value `'bad'` is printed on the console.
-
-2. In the second case ('consumer 2'), the rejection is also caught by a `.catch()` method, but now the catch handler completely ignores the rejection value and just returns the fallback value `'good.`. This becomes the fulfillment value of the promise returned by `.catch()`. The next `.then()` in the chain, completely oblivious that an error ever occurred, now prints the fulfillment value `'good'` on the console.
-
-```js
-const promise = new Promise((resolve, reject) => {
- reject('bad');
-});
-
-// consumer 1
-promise
- .catch(console.log); // -> "bad"
-
-// consumer 2
-promise
- .catch(() => 'good')
- .then(console.log); // -> "good"
-```
-
-\* The syntax `.catch(onRejected)` is a shorthand for `.then(null, onRejected)`.
-
-## Further readings
-
-Our previous students also enjoyed learning about promises at:
-
-In text:
-
-- http://javascript.info/promise-basics
-- https://blog.cloudboost.io/explaining-basic-javascript-promises-in-jip-en-janneketaal-c98763c0abd6
-- https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-promise-27fc71e77261
-
-Video: The net Ninja: https://www.youtube.com/watch?v=yswb4SkDoj0
-
-MDN:
-
-- [MDN - Promise definition](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
-- [MDN - Using Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)
-- [Promises/A+ specification](https://promisesaplus.com/)
diff --git a/fundamentals/scope.md b/fundamentals/scope.md
deleted file mode 100644
index 6dbfebbcf..000000000
--- a/fundamentals/scope.md
+++ /dev/null
@@ -1,168 +0,0 @@
-# Scope
-
-## What is scope?
-
-Definition from [Dictionary.com](http://www.dictionary.com/browse/scope):
-
-> noun
-1\. extent or range of view, outlook, application, operation, effectiveness, etc.:
-
-If you imagine yourself as the computer that is executing your JavaScript code, you can think of scope as meaning:
-
-> what you can see from where you are
-
-In this case the 'things' that you are looking for are variables and functions. When we say, "What's in scope?", we mean "Which variables and functions can be accessed from the current point of execution in your code?" As it happens, in JavaScript there are three types of scope to consider.
-
-## Global scope
-
-Variables and functions defined at global scope are visible from any point of execution in your code. Sometimes that's a good thing (or even essential), but in general you must avoid creating variables and functions in global scope unless you have specific reasons to do so.
-
-Consider the example below:
-
-```js
-a = 'Hello'; // don't do this
-console.log(a);
-```
-
-In this example we have assigned the value `'Hello'` to a variable that we forgot to declare (we forgot to use `let`, `const` or `var`). The JavaScript engine tries to be helpful and defines a variable `a` for us in **global** scope. More recently, the JavaScript community considered this friendliness to be a mistake and with ES5 introduced `strict` mode: place the string `'use strict';` at the top of your file. This now causes our code to fail with a run-time error when forgetting to 'declare' our variables.
-
-```js
-'use strict';
-a = 'Hello'; // produces: ReferenceError: a is not defined
-console.log(a);
-```
-
-You can correct this by declaring your variable with `let`, `const` or `var`:
-
-```js
-'use strict';
-var a = 'Hello';
-console.log(a);
-```
-
-This still puts the variable `a` into the global scope. So why is global scope a problem? Because you cannot be sure that the variable names you choose do not conflict with names already present in global scope (global scope is a busy place).
-
-It is best to apply the principle of 'need to know'. Only expose your variables to other parts in the JavaScript ecosystem that need to know about them. This is where local scope and block scope come in.
-
-## Local scope
-
-When you declare a function in JavaScript the function body represents a new, local scope, distinct from global scope. Variables defined in the function body are visible in that function body only: from the outside, you can't look in.
-
-```js
-'use strict';
-
-function myFunction() {
- const a = 'Hello';
- console.log(a);
-}
-
-myFunction();
-
-// console.log(a); <= this would produce: ReferenceError: a is not defined
-```
-
-But from the inside you can look out. In the example below the variable `a` is visible from inside the function body.
-
-```js
-'use strict';
-
-const a = 'Hello';
-
-function myFunction() {
- const b = ', world';
- console.log(a + b);
-}
-
-myFunction();
-```
-
-You might think that the variable `a` is in global scope. Actually, variables declared with either `let` or `const` have block scope, as will be discussed next. Note however that the function `myFunction` still resides in global scope. There is a way to get `myFunction` out of the global scope by using, what is called, an **IIFE** to create a **local scope** (or, with ES6, by placing the function definition in a block to create a **block scope**). See further down below.
-
-## Block scope
-
-The keywords `let` and `const` were introduced in ES6 as alternatives to the existing `var` keyword. We recommend that you use these newer keywords instead of `var`. They adhere to the rules for **block scope**, whereas `var` is completely oblivious of the concept.
-
-A new block scope (sometimes called _lexical_ scope) is created whenever you create a block of code inside a pair of curly braces. (Exception: the curly braces used to enclose the body of a function definition do not create a block scope. Instead, a **local scope** is created as discussed in the previous section.)
-
-Variables defined with `let` and `const` at the file level (i.e., not inside a function or a block) are considered to be in a file-level block scope ('script' scope). That's why the variable `a` in the previous code snippet is not in global scope. Had we replaced `const a` with `var a` then variable `a` _would be_ in global scope.
-
-## Scope Example
-
-In the figure below we show an example bringing all scope types together. The code fragment on the right-hand side is executed by means of a `