Pārlūkot izejas kodu

HW <17>comtinued

GennadySht 2 gadi atpakaļ
vecāks
revīzija
0a497234c5
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  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>