We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e58ab25 commit 8693f45Copy full SHA for 8693f45
fetch/exercise/fetch.html
@@ -0,0 +1,26 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Fetch Planet</title>
7
+
8
+ <script>
9
+ window.addEventListener("load", function(){
10
+ // TODO: fetch planets JSON
11
+ fetch("https://handlers.education.launchcode.org/static/planets.json").then(function(response){
12
+ response.json().then(function(json) {
13
+ const destination = document.getElementById("destination");
14
+ destination.innerHTML = `<h3>Planet ${json[0].name}</h3>`;
15
+ })
16
+ } )
17
+ });
18
+ </script>
19
+</head>
20
+<body>
21
+ <h1>Destination</h1>
22
+ <div id="destination">
23
+ <h3>Planet</h3>
24
+ </div>
25
+</body>
26
+</html>
0 commit comments