-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestPromise.html
More file actions
42 lines (30 loc) · 1.26 KB
/
testPromise.html
File metadata and controls
42 lines (30 loc) · 1.26 KB
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
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<!-- JQuery CDN 3.6 -->
<script src="https://code.jquery.com/jquery-3.6.0.js"
integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
<!-- personal custom CSS-->
<title>Hello, Fierem!</title>
</head>
<body>
<div id="testID"></div>
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<!--Personal custom JS script-->
<script>
let myPromise = promiseGiven();
myPromise.then(result => console.log(result));
function promiseGiven(){
return fetch(`http://www.omdbapi.com/?t=gladiator&apikey=7f5f0581`).then(response => response.json()).then(final => final);
}
</script>
</body>
</html>