diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md index 85bd03c413..6cbdef59c0 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md @@ -12,23 +12,29 @@ localeTitle:  يتكرر عبر مفاتيح كائن مع لـ ... في بيا ### مثال 1: - `for (let user in obj) { - if(obj.user.online === true) { - //code - } - } -` +```javascript + +for (let user in obj) { + if(obj.user.online === true) { + //code + } +} + +``` * يوضح المثال 2 كيفية استخدام الترميز `[square-bracket]` في تنفيذ الشفرة. ### المثال 2: - `for (let user in obj) { - if(obj[user]online === true) { - //code - } - } -` +```javascript + +for (let user in obj) { + if(obj[user].online === true) { + //code + } +} + +``` ### حل: diff --git a/guide/chinese/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md b/guide/chinese/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md index 63af4e1507..473f1726d2 100644 --- a/guide/chinese/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md +++ b/guide/chinese/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md @@ -13,11 +13,11 @@ localeTitle:  使用for ... in Statement中的对象键迭代 ### 例1: ```javascript -for (let user in obj) { - if(obj.user.online === true) { - //code - } - } +for (let user in obj) { + if(obj.user.online === true) { + //code + } +} ``` * 示例2演示了如何使用`[square-bracket]`表示法执行代码。 @@ -25,11 +25,11 @@ for (let user in obj) { ### 例2: ```javascript -for (let user in obj) { - if(obj[user]online === true) { - //code - } - } +for (let user in obj) { + if(obj[user].online === true) { + //code + } +} ``` ### 解: diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md index 4094cf1b2f..6e46d4f4f6 100644 --- a/guide/english/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md +++ b/guide/english/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md @@ -13,10 +13,10 @@ Method: ```javascript for (let user in obj) { - if(obj.user.online === true) { - //code - } + if(obj.user.online === true) { + //code } +} ``` @@ -27,10 +27,10 @@ for (let user in obj) { ```javascript for (let user in obj) { - if(obj[user]online === true) { - //code - } + if(obj[user].online === true) { + //code } +} ``` diff --git a/guide/portuguese/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md b/guide/portuguese/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md index 304c3717e5..8a4e6abced 100644 --- a/guide/portuguese/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md +++ b/guide/portuguese/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md @@ -13,11 +13,11 @@ Método: ### Exemplo 1: ```javascript -for (let user in obj) { - if(obj.user.online === true) { - //code - } - } +for (let user in obj) { + if(obj.user.online === true) { + //code + } +} ``` * O exemplo 2 demonstra como usar a notação `[square-bracket]` o código será executado. @@ -25,11 +25,11 @@ for (let user in obj) { ### Exemplo 2: ```javascript -for (let user in obj) { - if(obj[user]online === true) { - //code - } - } +for (let user in obj) { + if(obj[user].online === true) { + //code + } +} ``` ### Solução: diff --git a/guide/russian/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md b/guide/russian/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md index 5c36f7858f..a7c9965ce2 100644 --- a/guide/russian/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md +++ b/guide/russian/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md @@ -13,11 +13,11 @@ localeTitle:  Итерация через ключи объекта с помо ### Пример 1: ```javascript -for (let user in obj) { - if(obj.user.online === true) { - //code - } - } +for (let user in obj) { + if(obj.user.online === true) { + //code + } +} ``` * В примере 2 показано, как использовать нотацию с `[square-bracket]` код будет выполнен. @@ -25,11 +25,11 @@ for (let user in obj) { ### Пример 2: ```javascript -for (let user in obj) { - if(obj[user]online === true) { - //code - } - } +for (let user in obj) { + if(obj[user].online === true) { + //code + } +} ``` ### Решение: diff --git a/guide/spanish/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md b/guide/spanish/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md index ab5113c83f..0109886d4f 100644 --- a/guide/spanish/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md +++ b/guide/spanish/certifications/javascript-algorithms-and-data-structures/basic-data-structures/-iterate-through-the-keys-of-an-object-with-a-for...in-statement/index.md @@ -13,11 +13,11 @@ Método: ### Ejemplo 1: ```javascript -for (let user in obj) { - if(obj.user.online === true) { - //code - } - } +for (let user in obj) { + if(obj.user.online === true) { + //code + } +} ``` * El ejemplo 2 demuestra cómo usar la notación `[square-bracket]` se ejecutará el código. @@ -25,11 +25,11 @@ for (let user in obj) { ### Ejemplo 2: ```javascript -for (let user in obj) { - if(obj[user]online === true) { - //code - } - } +for (let user in obj) { + if(obj[user].online === true) { + //code + } +} ``` ### Solución: