|
1 | 1 | # Homework Week 9 |
2 | 2 |
|
| 3 | +##First off: |
| 4 | +Now that you've each written a SPA it's time to learn from each other. |
| 5 | +- Check the Repos list in the slack channel for your class. Review the repo of the person below you on the list (bottom will review top) |
| 6 | +- Pull their code, using Git Clone. Test their app locally and browse the code |
| 7 | +- Write issues for both the bad and the good parts you see. |
| 8 | +- Implement solutions that you think the other student handled better, suggest improvements for the parts they did worse. |
| 9 | +- Keep going until you feel you completely understand their code flow. |
| 10 | + |
| 11 | +#Second: |
| 12 | +Here are some resources and exercises to prepare you for the Node module. |
3 | 13 | [JavaScript : Closures](http://conceptf1.blogspot.nl/2013/11/javascript-closures.html) |
4 | 14 | [Everything you wanted to know about JavaScript scope](https://toddmotto.com/everything-you-wanted-to-know-about-javascript-scope/) |
5 | 15 | [JavaScript Scoping and Hoisting](http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html) |
@@ -47,55 +57,3 @@ Don't cheat - but if you get stuck ... http://stackoverflow.com/questions/750486 |
47 | 57 | } |
48 | 58 | </script> |
49 | 59 | ``` |
50 | | - |
51 | | -Rewrite to Async: |
52 | | - |
53 | | -```js |
54 | | -1. |
55 | | - |
56 | | -var sum = calculateSum(2, 6); |
57 | | -console.log(sum); |
58 | | - |
59 | | -2. |
60 | | - |
61 | | -var results = $.getJSON('http://myapi.com'); |
62 | | -showResults(results); |
63 | | - |
64 | | -3. |
65 | | - |
66 | | -var sum = calculateSum(2, 6); |
67 | | -if (sum > 8) { |
68 | | - console.log('larger than 8'); |
69 | | -} |
70 | | - |
71 | | -4. |
72 | | - |
73 | | -var data = $.getJSON('http://myapi.com'); |
74 | | -data = data.map(function (x) { return x * 8; }); |
75 | | - |
76 | | -writeDataToFile(data); |
77 | | -``` |
78 | | - |
79 | | - |
80 | | -4. You will need to create an HTML document out of the below snippet to run the below code. A hint - the code is syntactically correct but doesn't do what you would expect. Can you see why and fix it? |
81 | | - |
82 | | -## TODO !!! |
83 | | - |
84 | | -Choose two "GET" API endpoints from http://reqres.in |
85 | | -Use $.getJSON to load data from those two endpoints |
86 | | -Display the data on your web page. |
87 | | -It should not matter which endpoint is loaded first, the data should always look the same (you can add "?delay=" after the endpoint to simulate a delay). |
88 | | - |
89 | | -• Create at least 1 issue (bug / feature / code improvement) on another students github repository. Do this in pairs. |
90 | | -• solve the issue proposed by another student in your github repo. More info [here](https://hackyourfuture.slack.com/files/michahell/F31BX1XT6/Merging_a_local_branch_into_master) |
91 | | - |
92 | | -# optional Homework week 9 |
93 | | -``` |
94 | | -TicTacToe game |
95 | | -
|
96 | | -https://github.com/HackYourFuture/TicTacToeTDD |
97 | | -https://github.com/HackYourFuture/OOP-Student-and-Teacher |
98 | | -
|
99 | | -rewatch the Hangouts session here: https://www.youtube.com/watch?v=oc9ogCJz9rYs |
100 | | -
|
101 | | -``` |
0 commit comments