Skip to content

Commit 8247948

Browse files
committed
Prepare for class23
1 parent 0855a6d commit 8247948

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/week1/1-base/app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
const xhr = new XMLHttpRequest();
99
xhr.open(
1010
'GET',
11-
`http://api.nobelprize.org/v1/laureate.json?bornCountryCode=TR`,
11+
`http://api.nobelprize.org/v1/laureate.json?bornCountryCode=TR`
1212
);
1313
xhr.onload = () => {
1414
console.log(xhr.response);
15+
console.log(typeof xhr.response);
16+
17+
const result = JSON.parse(xhr.response);
18+
console.log(result);
19+
console.log(typeof result);
1520
};
1621
xhr.send();
1722
}

src/week1/2-function/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919

2020
fetchData(url, data => {
2121
console.log(data);
22+
console.log(typeof data);
2223
});
2324
}

src/week1/3-json/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121

2222
fetchJSON(url, data => {
2323
console.log(data);
24+
console.log(typeof data);
2425
});
2526
}

src/week1/4-errors/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Handle:
55
1. HTTP errors
66
2. Network errors
7+
Create an Error object to report errors
78
*/
89

910
'use strict';

0 commit comments

Comments
 (0)