diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index e1cb8994c..000000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "extends": ["airbnb", "prettier"],
- "plugins": ["prettier"],
- "env": {
- "browser": true,
- "jest": true
- },
- "rules": {
- "prettier/prettier": ["error"],
- "strict": "off",
- "func-names": "off",
- "import/no-dynamic-require": "off",
- "no-console": "off",
- "no-param-reassign": "off",
- "no-plusplus": "off",
- "no-restricted-syntax": "off",
- "object-shorthand": "off",
- "operator-assignment": "off",
- "prefer-arrow-callback": "off",
- "prefer-destructuring": "off",
- "prefer-template": "off",
- "trailing-comma": "off",
- "linebreak-style": "off"
- }
-}
diff --git a/.gitignore b/.gitignore
index 6c589c2f8..3c3629e64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,61 +1 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-
-# Runtime data
-pids
-*.pid
-*.seed
-*.pid.lock
-
-# Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
-
-# Coverage directory used by tools like istanbul
-coverage
-
-# nyc test coverage
-.nyc_output
-
-# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
-
-# Bower dependency directory (https://bower.io/)
-bower_components
-
-# node-waf configuration
-.lock-wscript
-
-# Compiled binary addons (http://nodejs.org/api/addons.html)
-build/Release
-
-# Dependency directories
-node_modules/
-jspm_packages/
-
-# Typescript v1 declaration files
-typings/
-
-# Optional npm cache directory
-.npm
-
-# Optional eslint cache
-.eslintcache
-
-# Optional REPL history
-.node_repl_history
-
-# Output of 'npm pack'
-*.tgz
-
-# Yarn Integrity file
-.yarn-integrity
-
-# dotenv environment variables file
-.env
-
-.netlify
-dist/
+node_modules
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 5e1bae462..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-language: node_js
-node_js:
- - '10'
-
-script:
- - npm run lint
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 79285a5eb..000000000
--- a/LICENSE
+++ /dev/null
@@ -1,3 +0,0 @@
-This work is licensed under the Creative Commons Attribution 4.0 International License.
-To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/
-or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
\ No newline at end of file
diff --git a/Week1/MAKEME.md b/Week1/MAKEME.md
index 79b197b83..5e378788b 100644
--- a/Week1/MAKEME.md
+++ b/Week1/MAKEME.md
@@ -28,15 +28,15 @@ Modify the (mostly empty) files in the `Week1/homework` folder for this step.
**1.2** Open the empty `index.html` and add the required HTML to load the `app.js` file. Open `index.html` in the browser and confirm that the `console.log` statement shows the array. (Open the Chrome Developer Tools and inspect the console.)
-**1.3** Remove the temporary `console.log` from step 1.1. Make a function (or functions) that generate a `ul` with `li` elements for each book ID in the array using a `for` loop. Make sure that the function names you choose are an accurate reflection of what they do. As a reminder, here are the recommended [Naming Conventions](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/naming_conventions.md).
+**1.3** Remove the temporary `console.log` from step 1.1. Make a function (or functions) that generate a `ul` with `li` elements for each book title in the array using a `for` loop. Make sure that the function names you choose are an accurate reflection of what they do. As a reminder, here are the recommended [Naming Conventions](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/naming_conventions.md).
-**1.4** Make an object (_not an array!_) containing information for each book. Each property of this object should be another (i.e., nested) object with the book ID you thought up in step 1.1 as a key, and at least the following properties: `title`, `language` and `author`.
+**1.4** Make an object (_not an array!_) containing information for each book. Each property of this object should be another (i.e., nested) object with the book title you thought up in step 1.1 as a key, and at least the following properties: `title`, `language` and `author`.
-**1.5** Now change the function from step 1.3 that 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 correct HTML elements for each piece of info, for instance, a heading for the title.
+**1.5** Now change the function from step 1.3 that you used to display the book title in a list to take the actual information about the book from the object and display that. Make sure you choose the correct HTML elements for each piece of info, for instance, a heading for the title.
**1.6** Beautify your html page with css (use the `style.css` file for that), add sources and alts to each of the images.
-**1.7** Find and download book covers for each book and construct a new object which has as keys the book IDs again, and as value the path to the image source (e.g. `{ harry_potter_blabla: './img/harry_potter_blabla.jpg', ... }`).
+**1.7** Find and download book covers for each book and construct a new object which has as keys the book titles again, and as value the path to the image source (e.g. `{ harry_potter_blabla: './img/harry_potter_blabla.jpg', ... }`).
**1.8** 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._)
diff --git a/Week1/New Text Document.js b/Week1/New Text Document.js
new file mode 100644
index 000000000..3ce0845b9
--- /dev/null
+++ b/Week1/New Text Document.js
@@ -0,0 +1,25 @@
+'use strict';
+
+const update = () => {
+ let value = parseInt(number.innerText);
+ value++;
+ number.innerText = value;
+};
+
+const root = document.getElementById('root');
+
+const number = document.createElement('div');
+number.style.width = '100%';
+number.innerText = 0;
+number.style.textAlign = 'center';
+number.style.fontSize = '250%';
+root.appendChild(number);
+
+const incr = document.createElement('button');
+incr.onclick = update;
+incr.setAttribute('class', 'my-button');
+incr.style.width = '100%';
+incr.innerText = 'incr';
+incr.style.textAlign = 'center';
+incr.style.fontSize = '250%';
+root.appendChild(incr);
diff --git a/Week1/README.md b/Week1/README.md
index b7faf0c20..c509afe0a 100644
--- a/Week1/README.md
+++ b/Week1/README.md
@@ -34,15 +34,19 @@ In week one we will discuss the following topics:
Then, click on the `{ }` button in the top-right corner of the settings screen to access the settings in JSON format.
+
```json
/// Place your settings in this file to overwrite the default settings
{
"editor.detectIndentation": false,
"editor.formatOnSave": true,
- "editor.formatOnType": true,
"editor.minimap.enabled": false,
"editor.renderIndentGuides": true,
"editor.tabSize": 2,
+ "editor.codeActionsOnSave": {
+ "source.fixAll": true
+ },
+ "eslint.autoFixOnSave": true,
"files.autoSave": "onFocusChange",
"prettier.printWidth": 100,
"prettier.singleQuote": true,
diff --git a/Week1/homework/.vscode/launch.json b/Week1/homework/.vscode/launch.json
new file mode 100644
index 000000000..a053d2340
--- /dev/null
+++ b/Week1/homework/.vscode/launch.json
@@ -0,0 +1,14 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "Launch Program",
+ "program": "${file}"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Week1/homework/.vscode/settings.json b/Week1/homework/.vscode/settings.json
new file mode 100644
index 000000000..3b6641073
--- /dev/null
+++ b/Week1/homework/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "git.ignoreLimitWarning": true
+}
\ No newline at end of file
diff --git a/Week1/homework/MY-app.js b/Week1/homework/MY-app.js
new file mode 100644
index 000000000..17d31f5c7
--- /dev/null
+++ b/Week1/homework/MY-app.js
@@ -0,0 +1,142 @@
+'use strict';
+
+{
+ const favoriteBooks = [
+ //1.1 Replace with your own book titles
+ 'harry_potter_chamber_secrets',
+ 'call_of_the_wild',
+ 'the_turtle',
+ 'snowball_and_the_bunny_adventures',
+ 'chicken_little',
+ 'hey_friend',
+ 'it_is_chilly_out_there',
+ 'stone_and_pain',
+ 'maybe_tomorrow',
+ 'alise_in_wonderland',
+ ];
+
+ // 1.2 Replace with your own code
+
+ //console.log(favoriteBooks);
+
+ //1.3 Remove the temporary console.log from step 1.1. Make a function (or functions) that generate a ul with li elements for each book ID
+ // in the array using a for loop. Make sure that the function names you choose are an accurate reflection of what they do. As a reminder,
+ //here are the recommended Naming Conventions.
+
+ // let booksList = document.createElement('ul');
+ // booksList.setAttribute('id', 'li');
+ // document.body.appendChild(booksList);
+
+ // let index;
+ // for (index in favoriteBooks) {
+ // let booksListItem = document.createElement('li');
+ // booksList.appendChild(booksListItem);
+ // booksListItem.textContent = favoriteBooks[index];
+ // }
+ // }
+ // generateList();
+ // function generateList(){
+
+
+// // 1.4 Make an object (not an array!) containing information for each book. Each property of this object should be another (i.e., nested)
+// object with the book ID you thought up in step 1.1 as a key, and at least the following properties: title, language and author.
+let bookProperties = {
+ harry_potter_chamber_secrets:{
+ title:"Harry Potter: Chamber of Secrets",
+ language:"English",
+ author:"Joanne K. Rowling",
+ },
+ call_of_the_wild:{
+ title:"Call of the Wild",
+ language:"English",
+ author:"Jack London",
+ },
+ the_turtle:{
+ title:"The Turtle",
+ language:"Anna -ish",
+ author:"Imaginery",
+ },
+ snowball_and_the_bunny_adventures:{
+ title:"Snowball and the Bunny Adventures",
+ language:"Anna -ish",
+ author:"Imaginery van Children",
+ },
+ chicken_little:{
+ title:"Chicken Little - The Sky is Falling",
+ language:"English",
+ author:"Folk Tale",
+ },
+ hey_friend:{
+ title:"Hey Friend",
+ language:"Anna -ish",
+ author:"Imaginery",
+ },
+ it_is_chilly_out_there:{
+ title:"It is Chilly out There",
+ language:"Anna -ish",
+ author:"Imaginery",
+ },
+ stone_and_pain:{
+ title:"Stone and Pain - The Life of Michelangelo Buonarotti",
+ language:"Chech",
+ author:"Karrel Schulz",
+ },
+ maybe_tomorrow:{
+ title:"Maybe Tomorrow",
+ language:"Anna -ish",
+ author:"Imaginery Delayer",
+ },
+ alise_in_wonderland:{
+ title:"Alise in Wonderland",
+ language:"English",
+ author:"Lewis Carrol",
+ }
+}
+
+
+// // 1.5 Now change the function from step 1.3 that 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 correct HTML elements for each piece of info, for instance, a heading for the title.
+function generateList(){
+ let booksList = document.createElement('ul');
+ booksList.setAttribute('id', 'li');
+ document.body.appendChild(booksList);
+
+ let index;
+
+ for (index in favoriteBooks) {
+ let booksListItem = document.createElement('li');
+ booksList.appendChild(booksListItem);
+
+ let BooksID = favoriteBooks[index];
+ booksListItem.textContent = favoriteBooks[index];
+ }
+}
+generateList();
+//Gabe's example
+// const unorderedListElement = document.createElement('ul');
+
+// for (let bookTitleKey in bookTitles) {
+// const bookUL = document.createElement ('ul');
+
+// const authorListEl = document.createElement('li')
+// authorListEl.innerText = bookTitles[bookTitleKey].author;
+// bookUL.appendChild(authorListEl)
+
+// const titleListEl = document.createElement('li')
+// titleListEl.innerText = bookTitles[bookTitleKey].author;
+// bookUL.appendChild(titleListEl)
+
+// const yearListEl = document.createElement('li')
+// yearListEl.innerText = bookTitles[bookTitleKey].author;
+// bookUL.appendChild(yearListEl)
+// }
+
+// // 1.6 Beautify your html page with css (use the style.css file for that), add sources and alts to each of the images.
+
+// // 1.7 Find and download book covers for each book and construct a new object which has as keys the book IDs again, and as value the path to
+// the image source (e.g. { harry_potter_blabla: './img/harry_potter_blabla.jpg', ... }).
+
+// // 1.8 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.)
+}
diff --git a/Week1/homework/adding_numbers.js b/Week1/homework/adding_numbers.js
new file mode 100644
index 000000000..685b40efc
--- /dev/null
+++ b/Week1/homework/adding_numbers.js
@@ -0,0 +1,30 @@
+const assert = chai.assert.deepStrictEqual
+const range = _.range
+const print = console.log
+print('##### begin #####')
+assert(range(5), [0,1,2,3,4])
+
+/*function sumAll(a, b) {
+ const max = Math.max(a, b);
+ const min = Math.min(a, b);
+ let result = 0;
+ for (var i=min; i <= max; i++){
+ result += i;
+ }
+return result;
+}*/
+
+function sumAll(a, b) {
+ const avg = (a+b)/2
+ const n = Math.abs(b-a)+1
+ return avg*n;
+}
+
+assert(10, sumAll(1, 4));
+assert(10, sumAll(4, 1));
+assert(1, sumAll(1, 1));
+assert(45, sumAll(5, 10));
+assert(5050, sumAll(1, 100));
+
+
+print('##### end #####')
diff --git a/Week1/homework/app.js b/Week1/homework/app.js
deleted file mode 100644
index a9b5f75d8..000000000
--- a/Week1/homework/app.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-{
- const bookTitles = [
- // Replace with your own book titles
- 'harry_potter_chamber_secrets',
- ];
-
- // Replace with your own code
- console.log(bookTitles);
-}
diff --git a/Week1/homework/extend-constructors-to-receive-arguments.json b/Week1/homework/extend-constructors-to-receive-arguments.json
new file mode 100644
index 000000000..ab3b8146d
--- /dev/null
+++ b/Week1/homework/extend-constructors-to-receive-arguments.json
@@ -0,0 +1 @@
+{"index.js":"function Dog(name, color) {\nthis.name = name;\nthis.color = color;\nthis.numLegs = 4; \n}\n\nlet terrier = new Dog(\"Gafgaf\", \"brown\");"}
\ No newline at end of file
diff --git a/Week1/homework/index.htm b/Week1/homework/index.htm
new file mode 100644
index 000000000..550464056
--- /dev/null
+++ b/Week1/homework/index.htm
@@ -0,0 +1,13 @@
+
+
+
+
+ Foo Coding
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Week1/homework/index.html b/Week1/homework/index.html
index b22147cd1..238e7436e 100644
--- a/Week1/homework/index.html
+++ b/Week1/homework/index.html
@@ -1 +1,29 @@
-
\ No newline at end of file
+
+
+
+
+
+ FavoriteBooks Excercise
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Week1/homework/style.css b/Week1/homework/style.css
index bab13ec23..44cb05eeb 100644
--- a/Week1/homework/style.css
+++ b/Week1/homework/style.css
@@ -1 +1 @@
-/* add your styling here */
\ No newline at end of file
+/* add your styling here */
diff --git a/Week1/homework/sum-all-numbers-in-a-range.json b/Week1/homework/sum-all-numbers-in-a-range.json
new file mode 100644
index 000000000..6c54d70be
--- /dev/null
+++ b/Week1/homework/sum-all-numbers-in-a-range.json
@@ -0,0 +1 @@
+{"index.js":"function sumAll(arr) {\n \n let minimumValue = Math.min(...arr);\n let maximumValue = Math.max(...arr);\n let summarize = 0;\n for (let i = minimumValue; i <= maximumValue; i += 1){\n console.log(i);\n summarize += i;\n }\n return summarize;\n}\n\nsumAll([1, 4]);\n\n\n// var arr;\n// for (arr = 0; arr < 5; arr++) {\n// // Runs 5 times, with values of step 0 through 4.\n// console.log(arr);\n// }\n\n"}
\ No newline at end of file
diff --git a/Week1/incrementSimple/incrementSimple.html b/Week1/incrementSimple/incrementSimple.html
new file mode 100644
index 000000000..6e954296a
--- /dev/null
+++ b/Week1/incrementSimple/incrementSimple.html
@@ -0,0 +1,12 @@
+
+
+
+ Increment
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Week1/incrementSimple/incrementSimple.js b/Week1/incrementSimple/incrementSimple.js
new file mode 100644
index 000000000..cf4eb87f9
--- /dev/null
+++ b/Week1/incrementSimple/incrementSimple.js
@@ -0,0 +1,25 @@
+"use strict"
+
+const update = () => {
+ let value = parseInt(number.innerText)
+ value++
+ number.innerText = value
+}
+
+const root = document.getElementById('root')
+
+const number = document.createElement('div')
+number.style.width = '100%'
+number.innerText = 0
+number.style.textAlign = 'center'
+number.style.fontSize = '250%'
+root.appendChild(number)
+
+const incr = document.createElement('button')
+incr.onclick = update
+incr.setAttribute('class', 'my-button')
+incr.style.width = '100%'
+incr.innerText = 'incr'
+incr.style.textAlign = 'center'
+incr.style.fontSize = '250%'
+root.appendChild(incr)
\ No newline at end of file
diff --git a/Week1/notes.txt b/Week1/notes.txt
new file mode 100644
index 000000000..e69de29bb
diff --git a/Week2/.vscode/settings.json b/Week2/.vscode/settings.json
new file mode 100644
index 000000000..8d330d45d
--- /dev/null
+++ b/Week2/.vscode/settings.json
@@ -0,0 +1,6 @@
+{
+ "cSpell.words": [
+ "everything",
+ "upcase"
+ ]
+}
\ No newline at end of file
diff --git a/Week2/LECTURENOTES.md b/Week2/LECTURENOTES.md
new file mode 100644
index 000000000..09352a864
--- /dev/null
+++ b/Week2/LECTURENOTES.md
@@ -0,0 +1,51 @@
+### Lecture Notes Week 2
+
+#### Before class
+Slack message students for things they'd like to review before diving into new topics
+
+## Reviewing (11-11:30am)
+Cover individual topics that students may still be stuck on from previous lectures and homework
+
+## JSON (11:30am-12pm)
+* Illustration on Google Maps. How do people from Sweden speak to people from Sri Lanka?
+* [Advice Slip](https://adviceslip.com/) and [API](https://api.adviceslip.com/#endpoint-random). If they have machines that run on the programming language RUST, how can we communicate with them? They serialize their data to JSON!
+* Douglass Crawford
+* What is JSON?
+ * Javscript Object Notation
+ * We are fortunate that it's familiar and easy to understand :)
+ * It is a STRING [PokeAPI](https://pokeapi.co/api/v2/pokemon/squirtle/)
+ * Not all javascript objects are valid json
+* Coding exercise (lecture-exercise.js)
+ * JSON.parse
+* Serialization vs Deserialization
+ * JSON.stringify()
+ * Other formats
+ * protobufs
+ * XML
+ * GRPC?!
+* Cover homework question #3
+
+## Functions advanced (12-12:30pm)
+* Different ways functions can be made:
+ * function declaration vs expression
+ * arrow function
+ * Omitting return, parameter parenthesis
+* What's a method?
+* Pure function? or side effects?
+* Example: how does a program run this? (example w/ a function, call of that function, and a console log)
+ * Call stack (stack overflow)
+* Params
+ * Extra params
+ * Default params
+* Recursion (basic example)
+* Example function
+ * pigs example?
+ * countChar("kakkerlak", "k")? With DOM manipulation?
+* Simplicity of functions
+ * while loop from [Chapter 5](http://eloquentjavascript.net/05_higher_order.html)
+* Higher order functions
+ * repeat(n, action)
+ * greaterThan10
+
+## Array Manipulations
+## Map, Filter, Reduce (others? every, some, etc)
diff --git a/Week2/MAKEME.md b/Week2/MAKEME.md
index 0169b7920..2709da79e 100644
--- a/Week2/MAKEME.md
+++ b/Week2/MAKEME.md
@@ -2,11 +2,10 @@
```
Topics discussed this week:
-• Functions + JSON/Arrays
-• Array Manipulations
• JSON
-• Map and filter
-• Arrow functions
+• Functions advanced
+• Array Manipulations
+• Map, filter, & reduce
```
> [Here](/Week3/README.md) you find the readings you have to complete before the third lecture.
@@ -139,7 +138,13 @@ If that's the case, try and fix the error. When done, run the tests again: `npm
Repeat the previous step until all (= 2 in this case) tests pass.
-## Step 3: ROVER
+## Step 3: JSON parsing
+
+1. Create an HTML file
+2. Insert a script tag that points to squirtle-sprites.js
+3. In squirtle-sprites.js, call fetchPokemonData() and convert the JSON string it returns to a javascript object so you can access its properties
+4. Display the sprite images (located in the parsed object) in the HTML page. You'll need to do some DOM manipulation kinda of stuff (maybe element.appendChild?)
+*Bonus Challenge*: Can you use an array method to loop over all sprites so you don't have to manually type each?
Finish up to chapter 7: JSON on [roverjs.com](http://roverjs.com/)!
@@ -171,3 +176,6 @@ Go over your homework one last time:
If the answer is 'yes' to all preceding questions you are ready to follow these instructions:
- [Handing in homework](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/homework_pr.md)
+
+### Do you have even more time?
+Read the _Eloquent Javascript_ chapters in the [Week 2 Readme](./README.md)
\ No newline at end of file
diff --git a/Week2/README.md b/Week2/README.md
index c58b21eb5..2b9dd1b9c 100644
--- a/Week2/README.md
+++ b/Week2/README.md
@@ -4,37 +4,32 @@
```
In week two we will discuss the following topics:
-• Functions + JSON/Arrays
-• Array Manipulations
• JSON
-• Map and filter
-• Arrow functions
+• Functions advanced
+• Array Manipulations
+• Map, filter, & reduce
```
## 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)
+- [FreeCodeCamp JSON](https://www.youtube.com/watch?v=B-k76DMOj2k)
+- [What is JSON and why does one use it?](https://www.quora.com/What-is-JSON-and-why-does-one-use-it/answer/Prid-Speed?ch=10&share=0b6f9763&srid=XxbK)
### 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://crockford.com/javascript/code.html
-
### Array cardio
- Wes Bos' awesome free tutorials. Just make a free account and do Array Cardio #1 [here](https://javascript30.com/)
-### From _Eloquent JavaScript_
-
-- Objects continued: http://eloquentjavascript.net/06_object.html
-
-
## Recommended readings
+These chapters from _Eloquent JavaScript_ are a bit advanced, but give in-depth explanations of the topics that will be discussed during the lecture. If you have the time, try giving these chapters a read.
-This chapter from _Eloquent JavaScript_ gives in-depth explanations of the topics that will be discussed during the lecture. Highly recommended (if time permits).
+- Chapter 3 - [Functions](https://eloquentjavascript.net/03_functions.html)
+- Chapter 4 - [Data Structures: Objects and Arrays](https://eloquentjavascript.net/04_data.html)
+- Chapter 5 [Higher-Order Functions](https://eloquentjavascript.net/05_higher_order.html)
-- Chapter 3 - [Functions](http://eloquentjavascript.net/03_functions.html)
-- Chapter 5 - [Higher-Order Functions](http://eloquentjavascript.net/05_higher_order.html)
+#### For fun
+ [The Weird History of JavaScript](https://www.youtube.com/watch?v=Sh6lK57Cuk4) shows just how haphazard the evolution of Javascript actually was.
_Please go through the material and come to class prepared!_
\ No newline at end of file
diff --git a/Week2/class_with_Gabe/example.html b/Week2/class_with_Gabe/example.html
new file mode 100644
index 000000000..0adb34d9e
--- /dev/null
+++ b/Week2/class_with_Gabe/example.html
@@ -0,0 +1,19 @@
+
+
+
+ Advice Slip Page
+
+
+
+
Your piece of random advice is
+
SAMPLE ADVICE
+
+
+
\ No newline at end of file
diff --git a/Week2/class_with_Gabe/lecture-excercises.js b/Week2/class_with_Gabe/lecture-excercises.js
new file mode 100644
index 000000000..e37bd89d2
--- /dev/null
+++ b/Week2/class_with_Gabe/lecture-excercises.js
@@ -0,0 +1,15 @@
+document.querySelector('h1').innerText = 'Monkey';
+
+async function getAdvice() {
+ const adviceResponse = await fetch('https://api.adviceslip.com/advice') //get bytes
+ const payloadText = await adviceResponse.text(); //convert bytes to text
+ const payloadObj = JSON.parse(payloadText)
+ return payloadObj.slip.advice;
+}
+
+
+async function addAdviceToPage() {
+ document.querySelector('h1').innerHTML = await getAdvice();
+}
+
+addAdviceToPage();
\ No newline at end of file
diff --git a/Week2/example.html b/Week2/example.html
new file mode 100644
index 000000000..ee9ce43a2
--- /dev/null
+++ b/Week2/example.html
@@ -0,0 +1,22 @@
+
+
+
+
+ Sample exercise
+
+
+
+