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

Skip to content

Commit 150b899

Browse files
author
Noer Paanakker
committed
finalize homeworks w2/w3
1 parent 3970aca commit 150b899

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55

66
![JavaScript3](./assets/javascript3.png)
77

8-
Welcome to JavaScript3! Congratulations on making it this far. You're well on your way to the top.
8+
Welcome to JavaScript3! Congratulations on making it this far. You're well on your way to the top!
99

10-
A big part of being a programmer means moving data from one place to another.
11-
In this module you'll be learning about one of the core things of what makes a web developer: working with APIs!
10+
A big part of being a programmer means moving data from one place to another. It also means working with other people's software. In this module you'll be learning about one of the core things of what makes a web developer: working with APIs!
11+
12+
On top of that you'll also learn how to think differently about how you write your programs. Like in any field, once you've mastered a particular way of doing things you start thinking about how it could be done differently. In programming we call these `paradigms` and in this module you'll one such paradigm: Object-Oriented Programming!
1213

1314
## Learning goals
1415

Week2/MAKEME.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ The enhanced application should fulfill the following requirements:
6565
4. You should be able to click on the repository name of the selected repository to open a new browser tab with the GitHub page for that repository.
6666
5. You should be able to click on a contributor to open a new browser tab with the GitHub page for that contributor.
6767
6. Your UI should be responsive. Try it with Chrome Developer Tools in the browser, using a mobile phone format and a tablet format, portrait and landscape.
68+
7. The `XMLHttpRequest` in the `fetchJSON` function should be replaced with `fetch`. Hint: Because `fetch` returns a promise out of the box there is no need create a promise yourself with `new Promise(...)`.
6869

6970
**Hints:**
7071

Week3/MAKEME.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,18 @@ Let's continue exercising those programming muscles! Go through the following ex
2525

2626
## **4. PROJECT: Hack Your Repo III**
2727

28-
> The homework for week 2 will build on the work you did in week 1. You will create a new branch based on the the previous week's branch.
28+
> The homework for week 3 will build on the work you did in week 2. You will create a new branch based on the the previous week's branch.
2929
3030
The final week's assignment consists of two parts.
3131

3232
In the first part you will update the homework from week 2 (in the `homework` folder). In the second part you will refactor your application to use `ES6 classes`. For this, you need to modify the files in the `homework-classes` folder.
3333

34-
### Step 1: Replace `XMLHttpRequest` with `fetch`
35-
36-
- Replace `XMLHttpRequest` in the `fetchJSON` function with `fetch`. Because `fetch` returns a promise out of the box there is no need create a promise yourself with `new Promise(...)`.
37-
38-
> `fetch` does not throw an error for HTTP errors. Review the documentation for [`response.ok`](https://developer.mozilla.org/en-US/docs/Web/API/Response/ok) for a clue how detect HTTP errors.
39-
40-
### Step 2: `async/await`
34+
### Step 1: `async/await`
4135

4236
- Refactor all `.then()` and `.catch()` methods with `async`/`await` and `try...catch`.
4337
- Make sure that your error handling code still works. See the instructions from week 2's [homework](../Week2/MAKEME.md) on how to force an error response from GitHub.
4438

45-
### Step 3: OOP and ES6 classes
39+
### Step 2: OOP and ES6 classes
4640

4741
This final assignment requires you to go the extra mile and get acquainted with Object Oriented Programming and ES6 classes.
4842

@@ -85,7 +79,7 @@ You can conclude the following from this diagram:
8579

8680
3. The **SelectView** class calls the `fetchData()` method from the **Model** class to request a data fetch.
8781

88-
#### Step 4: `axios`
82+
#### Step 3: `axios`
8983

9084
1. Modify the `fetchJSON` static method in **Model.js** to replace **fetch** with **axios**.
9185
2. Add a `<script>` tag to **index.html** to load the **axios** library from a CDN (Content Delivery Network) site. Use Google to find the right URL.

0 commit comments

Comments
 (0)