Explorar el Código

HW <17>comtinued

GennadySht hace 2 años
padre
commit
0a497234c5
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  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>