generated from CodeYourFuture/tv-show-dom-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
33 lines (30 loc) · 791 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const getEpisode1 = () => {
const p = fetch("https://api.tvmaze.com/episodes/1913280"),
{
method: 'POST',
headers: {
'Accept': 'application/json'
},
body:
);
console.log(p);
p.then(response => response.json
.then(data => showEpisodes(data)))
.catch(error => console.log("Error: " + error));
console.log(p);
}
const mainDiv = document.getElementById("main");
const showEpisodes1 = (episode) => {
mainDiv.innerText = JSON.stringify(episode);
try {
const a = 6/0;
console.log("A = " + a);
"hi".toUpperCase();
} catch(e) {
console.log(e);
//sendDevUrgentEmail(e);getting two errors
throw new Error("Something went wrong!");
}
console.log("hi".toUpperCase);
}
getEpisode1();