Skip to content

Commit cb28605

Browse files
authored
Update solution.js
1 parent 7240e96 commit cb28605

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

5-network/01-fetch/01-fetch-users/_js.view/solution.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
async function obtenerUsuarios(nombresUsuarios) {
2+
async function getUsers(names) {
33
let jobs = [];
44

5-
for(let nombre of nombresUsuarios) {
6-
let job = fetch(`https://api.github.com/users/${nombre}`).then(
5+
for(let name of names) {
6+
let job = fetch(`https://api.github.com/users/${name}`).then(
77
successResponse => {
88
if (successResponse.status != 200) {
99
return null;
@@ -18,7 +18,7 @@ async function obtenerUsuarios(nombresUsuarios) {
1818
jobs.push(job);
1919
}
2020

21-
let resultados = await Promise.all(jobs);
21+
let results = await Promise.all(jobs);
2222

23-
return resultados;
23+
return results;
2424
}

0 commit comments

Comments
 (0)