Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea48a05

Browse files
authored
Merge pull request HackYourFuture#7 from remarcmij/master
Added try...catch and async/await to week 3
2 parents dc861d5 + 6d95c62 commit ea48a05

File tree

32 files changed

+82
-35837
lines changed

32 files changed

+82
-35837
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ Here you can find course content and homework for the JavaScript3 modules
77
|Week|Topic|Read|Homework|
88
|----|-----|----|--------|
99
|1.|• Structure for a basic SPA (Single Page Application) <br>• [XMLHttpRequests](../../../fundamentals/blob/master/fundamentals/XMLHttpRequest.md) <br>• API calls|[Reading Week 1](/Week1/README.md)|[Homework Week 1](/Week1/MAKEME.md)|
10-
|2.|Async vs Sync <br>• [Event Loop (order of execution)](../../../fundamentals/blob/master/fundamentals/event_loop.md)<br>• [Promises](../../../fundamentals/blob/master/fundamentals/promises.md)|[Reading Week 2](/Week2/README.md)|[Homework Week 2](/Week2/MAKEME.md)|
11-
|3.|[Object Oriented Programming and ES6 Classes](../../../fundamentals/blob/master/fundamentals/oop_classes.md)<br>• [The `this` keyword](../../../fundamentals/blob/master/fundamentals/this.md)<br>• call, apply, bind |[Reading Week 3](/Week3/README.md)|[Homework Week 3](/Week3/MAKEME.md)|
10+
|2.|[Event Loop (order of execution)](../../../fundamentals/blob/master/fundamentals/event_loop.md)<br>• [Promises](../../../fundamentals/blob/master/fundamentals/promises.md)|[Reading Week 2](/Week2/README.md)|[Homework Week 2](/Week2/MAKEME.md)|
11+
|3.|[try...catch](../../../fundamentals/blob/master/fundamentals/try_catch.md)<br>• [async/await](../../../fundamentals/blob/master/fundamentals/async_await.md)<br>• [Object Oriented Programming and ES6 Classes](../../../fundamentals/blob/master/fundamentals/oop_classes.md)<br>• [The `this` keyword](../../../fundamentals/blob/master/fundamentals/this.md)<br>• call, apply, bind |[Reading Week 3](/Week3/README.md)|[Homework Week 3](/Week3/MAKEME.md)|
1212

1313
__Kind note:__
1414

1515
We expect you to __always__ come prepared to the class on Sunday.
1616

1717
### Overall
18-
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.
18+
A good understanding of all the above mentioned topics. Want to check your Knowledge? Go through the [JavaScript Fundamentals README](../../../fundamentals/blob/master/README.md) and research/ ask for help (Slack!) with the concepts that are not entirely clear.
1919

2020
*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 :)*

Week1/MAKEME.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,39 +63,17 @@ GitHub API documentation: [List organization repositories](https://developer.git
6363

6464
Note the query string `?per_page=100`. If you don't specify this query string you will only get the first 30 repositories (the default `per_page` is 30 and HYF has more than 30 - but less than 100).
6565

66-
#### Get repository information
67-
68-
You can get information about a specific repository through this API endpoint:
69-
70-
```
71-
https://api.github.com/repos/HackYourFuture/[repositoryName]
72-
```
73-
74-
You should replace `[repositoryName]` with the actual name of the repository.
75-
76-
GitHub API documentation: [Get](https://developer.github.com/v3/repos/#get)
77-
78-
### Get contributor information
66+
#### Get contributor information
7967

8068
The response object that is returned by GitHub from the request to get repository information includes a property with the `contributors_url`. Use the value of this property to make a new request to GitHub to obtain a list of contributors.
8169

82-
Note that, as a result of selecting a repository from the `<select>` element, your code must make two XMLHttpRequests, one after the other:
83-
84-
1. A first request to obtain repository information.
85-
2. A second request using the `contributors_url` obtained from (1) to get a list of contributor information.
86-
87-
Both requests must be done asynchronously.
88-
89-
Making two XMLHttpRequests in a row, where the second requests depends on the response of the first request is part of the assignment. While it is possible to figure out beforehand what the value of the `contributors_url` will be (by carefully reading the documentation), and subsequently make two independent XMLHttpRequests, this is not what is expected.
90-
91-
In the lecture we developed some utility functions to simplify making XMLHttpRequests and creating and manipulating HTML elements. You are free to copy and use these utility functions, but if you do we expect that you can explain how they work.
70+
In the lecture we developed some utility functions to simplify making XMLHttpRequests (function `fetchJSON()`) and creating and manipulating HTML elements (function `createAndAppend()`). You are free to copy and use these utility functions, but if you do we expect that you can explain how they work.
9271

9372
### Refinements
9473

9574
- Make all the repositories link to 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`).
9675
- Make sure the link opens in a new tab.
9776

98-
9977
### Important
10078

10179
- 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:

Week1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Here are resources that we like you to read as a preparation for the first lectu
1111

1212
### Fundamentals
1313

14-
- [XMLHttpRequest](../../../fundamentals/blob/master/fundamentals/XMLHttpRequest.md)
14+
- [XMLHttpRequest](../../../../fundamentals/blob/master/fundamentals/XMLHttpRequest.md)
1515

1616
### APIs
1717

Week1/lecture/.eslintrc

Lines changed: 0 additions & 38 deletions
This file was deleted.

Week1/lecture/.gitignore

Lines changed: 0 additions & 59 deletions
This file was deleted.

Week1/lecture/.vscode/settings.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

Week1/lecture/1-callback/callback.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

Week1/lecture/10-xhr-base/app.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

Week1/lecture/10-xhr-base/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

Week1/lecture/11-xhr-callback/app.js

Lines changed: 0 additions & 46 deletions
This file was deleted.

Week1/lecture/11-xhr-callback/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

Week1/lecture/12-xhr-render/app.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

Week1/lecture/12-xhr-render/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)