Jelajahi Sumber

HW <17>comtinued

GennadySht 2 tahun lalu
induk
melakukan
0a497234c5
1 mengubah file dengan 6 tambahan dan 1 penghapusan
  1. 6 1
      js/17_async/hw_17_01_luke.html

+ 6 - 1
js/17_async/hw_17_01_luke.html

@@ -56,6 +56,11 @@
             });
             return result;
         }
-        let res = improovedFetch('https://swapi.dev/api/people/1/');
+        improovedFetch('https://swapi.dev/api/people/1/').then(
+            res => res
+        )
+        .then(
+            res => document.write(JSON.stringify(res))
+        );
     </script>
 </body>