From db26400919cadb24a4d24da0ae3a4e753f58bb1c Mon Sep 17 00:00:00 2001 From: Andrei Popescu <32929697+andreipope@users.noreply.github.com> Date: Mon, 28 Feb 2022 16:36:30 +0200 Subject: [PATCH] Fixing for loop in chapter 6 (#641) Fixing for loop in chapter 6 --- de/6/06.md | 4 ++-- de/6/07.md | 4 ++-- de/6/08.md | 4 ++-- de/6/09.md | 4 ++-- en/6/06.md | 4 ++-- en/6/07.md | 4 ++-- en/6/08.md | 4 ++-- en/6/09.md | 4 ++-- es/6/06.md | 4 ++-- es/6/07.md | 4 ++-- es/6/08.md | 4 ++-- es/6/09.md | 4 ++-- fa/6/06.md | 4 ++-- fa/6/07.md | 4 ++-- fa/6/08.md | 4 ++-- fa/6/09.md | 4 ++-- fr/6/06.md | 4 ++-- fr/6/07.md | 4 ++-- fr/6/08.md | 4 ++-- fr/6/09.md | 4 ++-- it/6/06.md | 4 ++-- it/6/07.md | 4 ++-- it/6/08.md | 4 ++-- it/6/09.md | 4 ++-- jp/6/06.md | 4 ++-- jp/6/07.md | 4 ++-- jp/6/08.md | 4 ++-- jp/6/09.md | 4 ++-- ko/6/06.md | 4 ++-- ko/6/07.md | 4 ++-- ko/6/08.md | 4 ++-- ko/6/09.md | 4 ++-- pt/6/06-displaying-zombie-army.md | 4 ++-- pt/6/07-sending-transactions.md | 4 ++-- pt/6/08-calling-payable-functions.md | 4 ++-- pt/6/09-subscribing-to-events.md | 4 ++-- sk/6/06.md | 4 ++-- sk/6/07.md | 4 ++-- sk/6/08.md | 4 ++-- sk/6/09.md | 4 ++-- th/6/06.md | 4 ++-- th/6/07.md | 4 ++-- th/6/08.md | 4 ++-- th/6/09.md | 4 ++-- zh/10/10.md | 4 ++-- zh/6/06.md | 4 ++-- zh/6/07.md | 4 ++-- zh/6/08.md | 4 ++-- zh/6/09.md | 4 ++-- 49 files changed, 98 insertions(+), 98 deletions(-) diff --git a/de/6/06.md b/de/6/06.md index 9f5b521eb..bf9707c07 100755 --- a/de/6/06.md +++ b/de/6/06.md @@ -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) { @@ -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. \ No newline at end of file diff --git a/de/6/07.md b/de/6/07.md index 39b82f83d..295f14b60 100755 --- a/de/6/07.md +++ b/de/6/07.md @@ -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) { @@ -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) { diff --git a/de/6/08.md b/de/6/08.md index 5ac6d7188..9669a3667 100755 --- a/de/6/08.md +++ b/de/6/08.md @@ -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) { @@ -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) { diff --git a/de/6/09.md b/de/6/09.md index 1cbab0991..8857a9bc9 100755 --- a/de/6/09.md +++ b/de/6/09.md @@ -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) { @@ -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) { diff --git a/en/6/06.md b/en/6/06.md index 92aa5f6ea..6e68b84cc 100644 --- a/en/6/06.md +++ b/en/6/06.md @@ -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) { @@ -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. diff --git a/en/6/07.md b/en/6/07.md index da6dce875..e8bc57c7f 100644 --- a/en/6/07.md +++ b/en/6/07.md @@ -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) { @@ -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) { diff --git a/en/6/08.md b/en/6/08.md index 732b78a0b..284283d2e 100644 --- a/en/6/08.md +++ b/en/6/08.md @@ -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) { @@ -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) { diff --git a/en/6/09.md b/en/6/09.md index 36e3fa78c..50f78bc58 100644 --- a/en/6/09.md +++ b/en/6/09.md @@ -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) { @@ -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) { diff --git a/es/6/06.md b/es/6/06.md index 309ec862b..dcc48e677 100644 --- a/es/6/06.md +++ b/es/6/06.md @@ -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) { @@ -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. diff --git a/es/6/07.md b/es/6/07.md index 92b3a2a7e..a661b3b46 100644 --- a/es/6/07.md +++ b/es/6/07.md @@ -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) { @@ -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) { diff --git a/es/6/08.md b/es/6/08.md index 0b7221564..c0dffe877 100644 --- a/es/6/08.md +++ b/es/6/08.md @@ -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) { @@ -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) { diff --git a/es/6/09.md b/es/6/09.md index e479540ca..0bf8dd10d 100644 --- a/es/6/09.md +++ b/es/6/09.md @@ -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) { @@ -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) { diff --git a/fa/6/06.md b/fa/6/06.md index 5a6f06ad9..f58211349 100644 --- a/fa/6/06.md +++ b/fa/6/06.md @@ -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) { @@ -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. diff --git a/fa/6/07.md b/fa/6/07.md index 1bff88c92..1be68fdb0 100644 --- a/fa/6/07.md +++ b/fa/6/07.md @@ -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) { @@ -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) { diff --git a/fa/6/08.md b/fa/6/08.md index b08fd9af8..6599d482f 100644 --- a/fa/6/08.md +++ b/fa/6/08.md @@ -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) { @@ -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) { diff --git a/fa/6/09.md b/fa/6/09.md index d7e888699..4ffbdb496 100644 --- a/fa/6/09.md +++ b/fa/6/09.md @@ -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) { @@ -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) { diff --git a/fr/6/06.md b/fr/6/06.md index 5d6790a99..74db1faea 100644 --- a/fr/6/06.md +++ b/fr/6/06.md @@ -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) { @@ -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. diff --git a/fr/6/07.md b/fr/6/07.md index 9ce368e31..7d069186e 100644 --- a/fr/6/07.md +++ b/fr/6/07.md @@ -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) { @@ -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) { diff --git a/fr/6/08.md b/fr/6/08.md index f38e605bc..12ecb4ae6 100644 --- a/fr/6/08.md +++ b/fr/6/08.md @@ -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) { @@ -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) { diff --git a/fr/6/09.md b/fr/6/09.md index c14e857a2..a1712baad 100644 --- a/fr/6/09.md +++ b/fr/6/09.md @@ -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) { @@ -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) { diff --git a/it/6/06.md b/it/6/06.md index ddf9ef7f8..97d7762bd 100644 --- a/it/6/06.md +++ b/it/6/06.md @@ -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) { @@ -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. diff --git a/it/6/07.md b/it/6/07.md index 0419382b5..c3a33cb5d 100644 --- a/it/6/07.md +++ b/it/6/07.md @@ -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) { @@ -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) { diff --git a/it/6/08.md b/it/6/08.md index f773100e8..f85aaa1f4 100644 --- a/it/6/08.md +++ b/it/6/08.md @@ -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) { @@ -587,7 +587,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) { diff --git a/it/6/09.md b/it/6/09.md index f806a8df8..42defbf33 100644 --- a/it/6/09.md +++ b/it/6/09.md @@ -43,7 +43,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) { @@ -605,7 +605,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) { diff --git a/jp/6/06.md b/jp/6/06.md index 024ed9b9d..e7f6fa1d8 100755 --- a/jp/6/06.md +++ b/jp/6/06.md @@ -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) { @@ -559,6 +559,6 @@ var headSrc = "../assets/zombieparts/head-" + head + ".png" 1. まず最初にやりたいことは、`#zombies` divを空にすることだ。JQueryでは、こうやってできる: `$("#zombies").empty();`. -2. 次に、全IDをループしたい。ループはこうする: `for (id of ids) {` +2. 次に、全IDをループしたい。ループはこうする: `for (const id of ids) {}` 3. forループ内に、上のコードブロックをコピー&ペーストして、各idで`getZombieDetails(id)`を呼び出し、それを`$("#zombies").append(...)`を使ってHTMLへ追加するようにせよ。 diff --git a/jp/6/07.md b/jp/6/07.md index 819924118..a04c7e4e9 100755 --- a/jp/6/07.md +++ b/jp/6/07.md @@ -40,7 +40,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // コントラクトからゾンビ詳細を探し、`zombie`オブジェクトを返す。 getZombieDetails(id) .then(function(zombie) { @@ -456,7 +456,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) { diff --git a/jp/6/08.md b/jp/6/08.md index 49e84a065..d1b5fb3e9 100755 --- a/jp/6/08.md +++ b/jp/6/08.md @@ -40,7 +40,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // コントラクトからゾンビ詳細を探し、`zombie`オブジェクトを返す。 getZombieDetails(id) .then(function(zombie) { @@ -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) { diff --git a/jp/6/09.md b/jp/6/09.md index 2da1c3b71..3c3a3e41b 100755 --- a/jp/6/09.md +++ b/jp/6/09.md @@ -42,7 +42,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // コントラクトからゾンビ詳細を探し、`zombie`オブジェクトを返す。 getZombieDetails(id) .then(function(zombie) { @@ -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) { diff --git a/ko/6/06.md b/ko/6/06.md index 0b6dff62c..d35df698e 100644 --- a/ko/6/06.md +++ b/ko/6/06.md @@ -435,7 +435,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // 우리 컨트랙트에서 좀비 상세 정보를 찾아, `zombie` 객체 반환 getZombieDetails(id) .then(function(zombie) { @@ -558,6 +558,6 @@ var headSrc = "../assets/zombieparts/head-" + head + ".png" 1. 우리가 처음 할 것은 `#zombies` div를 비우는 것이네. jQuery에서는 `$("#zombies").empty();`를 이용해서 이를 처리할 수 있네. -2. 다음으로, for 반복문을 이용해 모든 id에 접근해야 하네: `for (id of ids) {` +2. 다음으로, for 반복문을 이용해 모든 id에 접근해야 하네: `for (const id of ids) {}` 3. for 반복문에서 각 id에 대해 `getZombieDetails(id)`라는 코드 블록을 복사/붙여넣기한 다음 `$("#zombies").append(...)`를 사용하여 HTML에 추가하게. diff --git a/ko/6/07.md b/ko/6/07.md index c69c9d06e..bceb669bc 100644 --- a/ko/6/07.md +++ b/ko/6/07.md @@ -41,7 +41,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // 우리 컨트랙트에서 좀비 상세 정보를 찾아, `zombie` 객체 반환 getZombieDetails(id) .then(function(zombie) { @@ -457,7 +457,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // 우리 컨트랙트에서 좀비 상세 정보를 찾아, `zombie` 객체 반환 getZombieDetails(id) .then(function(zombie) { diff --git a/ko/6/08.md b/ko/6/08.md index 84cdfdd57..356312a1b 100644 --- a/ko/6/08.md +++ b/ko/6/08.md @@ -41,7 +41,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // 우리 컨트랙트에서 좀비 상세 정보를 찾아, `zombie` 객체 반환 getZombieDetails(id) .then(function(zombie) { @@ -488,7 +488,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // 우리 컨트랙트에서 좀비 상세 정보를 찾아, `zombie` 객체 반환 getZombieDetails(id) .then(function(zombie) { diff --git a/ko/6/09.md b/ko/6/09.md index eae43f192..169df3d77 100644 --- a/ko/6/09.md +++ b/ko/6/09.md @@ -43,7 +43,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // 우리 컨트랙트에서 좀비 상세 정보를 찾아, `zombie` 객체 반환 getZombieDetails(id) .then(function(zombie) { @@ -506,7 +506,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // 우리 컨트랙트에서 좀비 상세 정보를 찾아, `zombie` 객체 반환 getZombieDetails(id) .then(function(zombie) { diff --git a/pt/6/06-displaying-zombie-army.md b/pt/6/06-displaying-zombie-army.md index b0201af5f..662708c48 100644 --- a/pt/6/06-displaying-zombie-army.md +++ b/pt/6/06-displaying-zombie-army.md @@ -436,7 +436,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // Busca os detalhes de zumbis do nosso contrato. Retorna um objeto `zumbi` getZombieDetails (id) .then(function(zumbi) { @@ -560,6 +560,6 @@ Criamos uma função vazia `displayZombies` para você. Vamos preenchê-lo. 1. A primeira coisa que queremos fazer é esvaziar o div `#zombies`. No JQuery, você pode fazer isso com `$("#zombies").empty();`. -2. Em seguida, vamos querer percorrer todos os ids, usando um loop for: `for (id of ids) {` +2. Em seguida, vamos querer percorrer todos os ids, usando um loop for: `for (const id of ids) {}` 3. Dentro do loop for, copie e cole o bloco de código acima do chamado `getZombieDetails(id)` para cada id e então use `$("#zombies").append(...)` para adicioná-lo ao nosso HTML. diff --git a/pt/6/07-sending-transactions.md b/pt/6/07-sending-transactions.md index da3fba7a6..4147a0eff 100644 --- a/pt/6/07-sending-transactions.md +++ b/pt/6/07-sending-transactions.md @@ -41,7 +41,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // Busca os detalhes de zumbis do nosso contrato. Retorna um objeto `zumbi` getZombieDetails (id) .then(function(zumbi) { @@ -458,7 +458,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // Busca os detalhes de zumbis do nosso contrato. Retorna um objeto `zumbi` getZombieDetails (id) .then(function(zumbi) { diff --git a/pt/6/08-calling-payable-functions.md b/pt/6/08-calling-payable-functions.md index 4ff114966..21c3c9beb 100644 --- a/pt/6/08-calling-payable-functions.md +++ b/pt/6/08-calling-payable-functions.md @@ -41,7 +41,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // Busca os detalhes de zumbis do nosso contrato. Retorna um objeto `zumbi` getZombieDetails (id) .then(function(zumbi) { @@ -489,7 +489,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // Busca os detalhes de zumbis do nosso contrato. Retorna um objeto `zumbi` getZombieDetails (id) .then(function(zumbi) { diff --git a/pt/6/09-subscribing-to-events.md b/pt/6/09-subscribing-to-events.md index 689fba8ad..14efc335d 100644 --- a/pt/6/09-subscribing-to-events.md +++ b/pt/6/09-subscribing-to-events.md @@ -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) { @@ -506,7 +506,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // Busca os detalhes de zumbis do nosso contrato. Retorna um objeto `zumbi` getZombieDetails (id) .then(function(zumbi) { diff --git a/sk/6/06.md b/sk/6/06.md index a16e2056f..4332db8ae 100644 --- a/sk/6/06.md +++ b/sk/6/06.md @@ -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) { @@ -560,6 +560,6 @@ Vytvorili sme za teba prázdnu funkciu `displayZombies`. Poďme ju teraz vyplni 1. Prvá vec ktorú v nej musíš spraviť je vyprázdniť `#zombies` div. Pomocou JQuery to môžeš spraviť takto: `$("#zombies").empty();`. -2. Ďalej chceme cyklom iterovať cez všetky IDčka. Použi for cyklus: `for (id of ids) {`. +2. Ďalej chceme cyklom iterovať cez všetky IDčka. Použi for cyklus: `for (const id of ids) {}`. 3. Vo vnútri cyklu, skopíruj zhora blok kódu ktorý volal `getZombieDetails(id)` pre každé ID. Potom použi `$("#zombies").append(...)` na to, aby si výsledok pridal do HTML. diff --git a/sk/6/07.md b/sk/6/07.md index 0bdd54c43..2c93f74b7 100644 --- a/sk/6/07.md +++ b/sk/6/07.md @@ -41,7 +41,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // Zisti z našeho kontraktu detaily o zombie. Naspäť dostaneme `zombie` objekt getZombieDetails(id) .then(function(zombie) { @@ -458,7 +458,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) { diff --git a/sk/6/08.md b/sk/6/08.md index 954e15921..2bd2a6d5e 100644 --- a/sk/6/08.md +++ b/sk/6/08.md @@ -41,7 +41,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // Zisti z našeho kontraktu detaily o zombie. Naspäť dostaneme `zombie` objekt getZombieDetails(id) .then(function(zombie) { @@ -489,7 +489,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) { diff --git a/sk/6/09.md b/sk/6/09.md index 590c3d50e..5359d8895 100644 --- a/sk/6/09.md +++ b/sk/6/09.md @@ -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) { @@ -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) { diff --git a/th/6/06.md b/th/6/06.md index 15669bdb3..4a77b61a4 100644 --- a/th/6/06.md +++ b/th/6/06.md @@ -435,7 +435,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // เป็นการดูข้อมูลของซอมบี้จาก contract และ return ออบเจ็กต์ `zombie` ออกมา getZombieDetails(id) .then(function(zombie) { @@ -558,6 +558,6 @@ var headSrc = "../assets/zombieparts/head-" + head + ".png" 1. สิ่งแรกที่จะทำก็คือเคลียร์ `#zombies` div ใน JQuery ซึ่งเราสามารถใช้ `$("#zombies").empty();` ในการทำเช่นนี้ -2. ต่อมาก็จะต้อง loop ผ่าน id ทั้งหมด ซึ่งเราจะใช้ for loop: `for (id of ids) {` +2. ต่อมาก็จะต้อง loop ผ่าน id ทั้งหมด ซึ่งเราจะใช้ for loop: `for (const id of ids) {}` 3. ภายใน for loop ให้ทำการ copy/paste ตัวcode block ด้านบนที่เรียกว่า`getZombieDetails(id)` สำหรับแต่ละ id และหลังจากนั้นให้ใช้ `$("#zombies").append(...)` เพื่อเพิ่มมันลงไปยัง HTML ของเรา diff --git a/th/6/07.md b/th/6/07.md index 4753d84a1..60b86e783 100644 --- a/th/6/07.md +++ b/th/6/07.md @@ -41,7 +41,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // เข้าดูข้อมูลของซอมบี้จาก contract ของเราเอง รีเทิร์นอ็อบเจ็กต์ `zombie` ออกมา getZombieDetails(id) .then(function(zombie) { @@ -457,7 +457,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // เป็นการดูข้อมูลของซอมบี้จาก contract และ return ออบเจ็กต์ `zombie` ออกมา getZombieDetails(id) .then(function(zombie) { diff --git a/th/6/08.md b/th/6/08.md index 0d6a225df..65f5ee260 100644 --- a/th/6/08.md +++ b/th/6/08.md @@ -41,7 +41,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // ดูข้อมูลต่างๆ จาก contract ของเจ้าซอมบี้ แล้ว return อ็อบเจ็กต์ `zombie` ออกมา getZombieDetails(id) .then(function(zombie) { @@ -488,7 +488,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // ดูข้อมูลต่างๆ จาก contract ของเจ้าซอมบี้ แล้ว return อ็อบเจ็กต์ `zombie` ออกมา getZombieDetails(id) .then(function(zombie) { diff --git a/th/6/09.md b/th/6/09.md index a2247cd7d..7c9d770f1 100644 --- a/th/6/09.md +++ b/th/6/09.md @@ -43,7 +43,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // ดูรายละเอียดซอมบี้จาก contract ที่เรามี แล้วทำการ return อ็อบเจ็กต์ `zombie` ออกมา getZombieDetails(id) .then(function(zombie) { @@ -506,7 +506,7 @@ material: function displayZombies(ids) { $("#zombies").empty(); - for (id of ids) { + for (const id of ids) { // ตรวจดูรายละเอียดของซอมบี้จากใน contract ที่เรามี และ return อ็อบเจ็กต์ `zombie` ออกมา getZombieDetails(id) .then(function(zombie) { diff --git a/zh/10/10.md b/zh/10/10.md index c6aab6f70..56570fca9 100644 --- a/zh/10/10.md +++ b/zh/10/10.md @@ -55,7 +55,7 @@ material: async 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) { @@ -2325,7 +2325,7 @@ material: async 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) { diff --git a/zh/6/06.md b/zh/6/06.md index 550ddf32b..874796ff1 100644 --- a/zh/6/06.md +++ b/zh/6/06.md @@ -888,7 +888,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) { @@ -1011,6 +1011,6 @@ var headSrc = "../assets/zombieparts/head-" + i + ".png" 1. 首先我们需要清空 `#zombies` 的内容。 用JQuery,你可以这样做: `$("#zombies").empty();`。 -2. 接下来,我们要循环遍历所有的 id,循环这样用: `for (id of ids) {` +2. 接下来,我们要循环遍历所有的 id,循环这样用: `for (const id of ids) {}` 3. 在循环内部,复制粘贴上面的代码,对每一个id调用 `getZombieDetails(id)`,然后用 `$("#zombies").append(...)` 把内容追加进我们的 HTML 里面。 diff --git a/zh/6/07.md b/zh/6/07.md index 02bece290..bbc23dde9 100644 --- a/zh/6/07.md +++ b/zh/6/07.md @@ -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) { @@ -910,7 +910,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) { diff --git a/zh/6/08.md b/zh/6/08.md index 4c3984dc1..01aab624e 100644 --- a/zh/6/08.md +++ b/zh/6/08.md @@ -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) { @@ -941,7 +941,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) { diff --git a/zh/6/09.md b/zh/6/09.md index 317db557e..7c7ec541c 100644 --- a/zh/6/09.md +++ b/zh/6/09.md @@ -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) { @@ -962,7 +962,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) {