You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Week1/MAKEME.md
+18-16Lines changed: 18 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -17,38 +17,40 @@ This week's concepts can be challenging, therefore let's get an easy introductio
17
17
18
18
> Inside of your `JavaScript3` fork and inside of the `Week1` folder, create a folder called `homework`. Inside of that folder, create a folder called `js-exercises`. For all the following exercises create a new `.js` file in that folder (3 files in total). Make sure the name of each file reflects its content: for example, the filename for exercise one could be placeKitten.js.
19
19
20
-
**Exercise 1: Place the kitten**
20
+
**Exercise 1: Who do we have here?**
21
21
22
-
Who doesn't love kittens on their screen?
22
+
Wouldn't it cool to make a new friend with just the click of a button?
23
23
24
-
Write an function that makes an API call to https://wwww.placekitten.com/api
24
+
Write a function that makes an API call to `https://www.randomuser.me/api`
25
25
26
-
- Inside the same file write two programs: one with `XMLHttpRequest`, and the other with `axios`
27
-
- Each function should make an API call to the given endpoint: `https://wwww.placekitten.com/api`
26
+
- Inside the same file write two functions: one with `XMLHttpRequest`, and the other with `axios`
27
+
- Each function should make an API call to the given endpoint: `https://www.randomuser.me/api`
28
28
- Log the received data to the console
29
29
- Incorporate error handling
30
30
31
-
**Exercise 2: Who do we have here?**
31
+
**Exercise 2: Programmer humor**
32
32
33
-
Wouldn't it cool to make a new friend with just the click of a button?
33
+
Who knew programmers could be funny?
34
34
35
-
Write a function that makes an API call to https://www.randomuser.me/api
35
+
Write an function that makes an API call to `https://xkcd.com/info.0.json`
36
36
37
-
- Inside the same file write two functions: one with `XMLHttpRequest`, and the other with `axios`
38
-
- Each function should make an API call to the given endpoint: `https://www.randomuser.me/api`
37
+
- Inside the same file write two programs: one with `XMLHttpRequest`, and the other with `axios`
38
+
- Each function should make an API call to the given endpoint: `https://xkcd.com/info.0.json`
39
39
- Log the received data to the console
40
+
- Render the `img` property into an `<img>` tag in the DOM
40
41
- Incorporate error handling
41
42
42
-
**Exercise 3: Photo gallery**
43
+
**Exercise 3: Dog photo gallery**
43
44
44
-
Let's make a randomized photo gallery!
45
+
Let's make a randomized dog photo gallery!
45
46
46
-
Write a function that makes an API call to https://picsum.photos/400
47
+
Write a function that makes an API call to `https://dog.ceo/api/breeds/image/random`. It should trigger after clicking a button in your webpage. Every time the button is clicked it should append a new dog image to the DOM.
47
48
48
49
- Create an `index.html` file that will display your random image
49
-
- Write two programs: one with `XMLHttpRequest`, and the other with `axios`
50
-
- Each function should make an API call to the given endpoint: `https://picsum.photos/400`
51
-
- After receiving the data, render it to the page in a `<img>`
50
+
- Add 2 `<button>` and 1 `<ul>` element, either in the HTML or through JavaScript
51
+
- Write two versions for the button functionality: one with `XMLHttpRequest`, and the other with `axios`
52
+
- When any one of the 2 buttons is clicked it should make an API call to `https://dog.ceo/api/breeds/image/random`
53
+
- After receiving the data, append to the `<ul>` a `<li>` that contains an `<img>` element with the dog image
0 commit comments