Skip to content

Commit

Permalink
Fixing for loop in chapter 6 (CryptozombiesHQ#641)
Browse files Browse the repository at this point in the history
Fixing for loop in chapter 6
  • Loading branch information
andreipope authored Feb 28, 2022
1 parent 4023162 commit db26400
Show file tree
Hide file tree
Showing 49 changed files with 98 additions and 98 deletions.
4 changes: 2 additions & 2 deletions de/6/06.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -556,6 +556,6 @@ We created an empty `displayZombies` function for you. Let's fill it in.

1. The first thing we'll want to do is empty the `#zombies` div. In JQuery, you can do this with `$("#zombies").empty();`.

2. Next, we'll want to loop through all the ids, using a for loop: `for (id of ids) {`
2. Next, we'll want to loop through all the ids, using a for loop: `for (const id of ids) {}`

3. Inside the for loop, copy/paste the code block above that called `getZombieDetails(id)` for each id and then used `$("#zombies").append(...)` to add it to our HTML.
4 changes: 2 additions & 2 deletions de/6/07.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -459,7 +459,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions de/6/08.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -490,7 +490,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions de/6/09.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -508,7 +508,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions en/6/06.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -662,6 +662,6 @@ We created an empty `displayZombies` function for you. Let's fill it in.

1. The first thing we'll want to do is empty the `#zombies` div. In JQuery, you can do this with `$("#zombies").empty();`.

2. Next, we'll want to loop through all the ids, using a for loop: `for (id of ids) {`
2. Next, we'll want to loop through all the ids, using a for loop: `for (const id of ids) {}`

3. Inside the for loop, copy/paste the code block above that called `getZombieDetails(id)` for each id and then used `$("#zombies").append(...)` to add it to our HTML.
4 changes: 2 additions & 2 deletions en/6/07.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -561,7 +561,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions en/6/08.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -592,7 +592,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions en/6/09.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -610,7 +610,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions es/6/06.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -596,5 +596,5 @@ Sin embargo, como hay un montón de código en ese archivo, está fuera del alca
## Vamos a probarlo
Hemos creado una función vacía llamada `displayZombies` para ti. Vamos a llenarla.
1. Lo primero que queremos hacer es vaciar el div `#zombies`. En JQuery, puedes hacer esto con `$("#zombies").empty();`.
2. Después, queremos recorrer todas las IDs, usando un bucle for: `for (id of ids) {`
2. Después, queremos recorrer todas las IDs, usando un bucle for: `for (const id of ids) {}`
3. Dentro del bucle, copia/pega el bloque de código anterior llamado `getZombieDetails(id)` para cada ID y luego utilizado `$("#zombies").append(...)` para agregarlo a tu código HTML.
4 changes: 2 additions & 2 deletions es/6/07.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ material:
}
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -498,7 +498,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions es/6/08.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ material:
}
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Obtener los detalles del zombi de nuestro contrato. Devuelve un objeto `zombie`
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -527,7 +527,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions es/6/09.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ material:
}
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Obtener los detalles del zombi de nuestro contrato. Devuelve un objeto `zombie`
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -544,7 +544,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions fa/6/06.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -659,6 +659,6 @@ We created an empty `displayZombies` function for you. Let's fill it in.

1. The first thing we'll want to do is empty the `#zombies` div. In JQuery, you can do this with `$("#zombies").empty();`.

2. Next, we'll want to loop through all the ids, using a for loop: `for (id of ids) {`
2. Next, we'll want to loop through all the ids, using a for loop: `for (const id of ids) {}`

3. Inside the for loop, copy/paste the code block above that called `getZombieDetails(id)` for each id and then used `$("#zombies").append(...)` to add it to our HTML.
4 changes: 2 additions & 2 deletions fa/6/07.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -557,7 +557,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions fa/6/08.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -588,7 +588,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions fa/6/09.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -606,7 +606,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions fr/6/06.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -558,6 +558,6 @@ Nous avons créé une fonction `displayZombies` vide pour vous. Nous allons la c

1. La première chose que nous voulons faire est de supprimer le contenu de la div `#zombies`. En JQuery, vous pouvez faire cela avec `$("#zombies").empty();`.

2. Ensuite, nous allons vouloir itérer sur tous les ids, en utilisant une boucle "for": `for (id of ids) {`
2. Ensuite, nous allons vouloir itérer sur tous les ids, en utilisant une boucle "for": `for (const id of ids) {}`

3. À l'intérieur de cette boucle, copiez/collez le bloc de code ci-dessus qui appelle `getZombieDetails(id)` pour chaque id puis utilisez `$("#zombies").append(...)` pour l'ajouter à notre HTML.
4 changes: 2 additions & 2 deletions fr/6/07.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -457,7 +457,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions fr/6/08.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -488,7 +488,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions fr/6/09.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -506,7 +506,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Look up zombie details from our contract. Returns a `zombie` object
getZombieDetails(id)
.then(function(zombie) {
Expand Down
4 changes: 2 additions & 2 deletions it/6/06.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Cerca i dettagli degli zombi dal nostro contratto. Restituisce un oggetto `zombie`
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -658,6 +658,6 @@ Abbiamo creato una funzione vuota `displayZombies` per te. Compiliamola.

1. La prima cosa che vorremmo fare è svuotare il div `#zombies`. In JQuery, puoi farlo con `$("#zombies").empty();`.

2. Successivamente vorremmo scorrere tutti gli id usando un ciclo for: `for (id of ids) {`
2. Successivamente vorremmo scorrere tutti gli id usando un ciclo for: `for (const id of ids) {}`

3. All'interno del ciclo for, copia/incolla il blocco del codice di sopra chiamato `getZombieDetails(id)` per ogni id e quindi usa `$("#zombies").append(...)` per aggiungerlo al nostro HTML.
4 changes: 2 additions & 2 deletions it/6/07.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Cerca i dettagli degli zombi dal nostro contratto. Restituisce un oggetto `zombie`
getZombieDetails(id)
.then(function(zombie) {
Expand Down Expand Up @@ -556,7 +556,7 @@ material:
function displayZombies(ids) {
$("#zombies").empty();
for (id of ids) {
for (const id of ids) {
// Cerca i dettagli degli zombi dal nostro contratto. Restituisce un oggetto `zombie`
getZombieDetails(id)
.then(function(zombie) {
Expand Down
Loading

0 comments on commit db26400

Please sign in to comment.