From b9be06aa0a47d732c851fb6be9252ca216d20e4f Mon Sep 17 00:00:00 2001 From: camperbot Date: Thu, 1 Jun 2023 22:14:22 +0530 Subject: [PATCH] chore(i18n,learn): processed translations (#50582) --- ...-setters-to-control-access-to-an-object.md | 63 ++++++------------- ...-setters-to-control-access-to-an-object.md | 63 ++++++------------- ...-setters-to-control-access-to-an-object.md | 63 ++++++------------- ...-setters-to-control-access-to-an-object.md | 63 ++++++------------- ...-setters-to-control-access-to-an-object.md | 63 ++++++------------- .../61b306305810f1c9040ce5a2.md | 4 +- .../6165d3b702a5d92ad970b30c.md | 2 +- .../6196d41d40bf9b2aaea5d520.md | 2 +- .../61993cf26a8e0f0a553db223.md | 4 +- .../619d23089e787e216a7043d6.md | 2 +- .../61a8fe15a6a31306e60d1e89.md | 4 +- .../5d822fd413a79914d39e98fa.md | 4 +- .../5d822fd413a79914d39e993b.md | 2 +- .../5dc17dc8f86c76b9248c6eb5.md | 2 +- .../5ef9b03c81a63668521804d1.md | 2 +- .../5ef9b03c81a63668521804d9.md | 2 +- .../5ef9b03c81a63668521804de.md | 4 +- .../5f05a1d8e233dff4a68508d8.md | 4 +- .../5f0d4d04b435f13ab6550053.md | 2 +- .../60f1a9cbd23023082e149fee.md | 2 +- .../60f83e7bfc09900959f41e20.md | 6 +- .../60fab4a123ce4b04526b082b.md | 2 +- .../60facde2d0dc61085b41063f.md | 2 +- .../60ffe9cb47809106eda2f2c9.md | 2 +- .../61fd8e491324ce717da97ffe.md | 2 +- .../61fd933ba685de776a94997e.md | 4 +- .../612e6afc009b450a437940a1.md | 6 +- .../60a3e3396c7b40068ad69978.md | 2 +- .../60a3e3396c7b40068ad6998f.md | 2 +- .../615f41c979787462e76dab90.md | 2 +- .../615f74a71f1e498619e38ee8.md | 4 +- .../615f8f1223601fa546e93f31.md | 2 +- ...-setters-to-control-access-to-an-object.md | 63 ++++++------------- ...-setters-to-control-access-to-an-object.md | 63 ++++++------------- ...-setters-to-control-access-to-an-object.md | 63 ++++++------------- .../63b6075a62883218d282504c.md | 10 +-- .../63b60821c855d01b1eda3c0b.md | 16 ++--- .../63b60aaaa65f8922bfce6b7e.md | 26 ++++---- .../63b60af1a0b9f7238a9dd294.md | 28 ++++----- .../63b60c09c5039f25a3b2dda9.md | 20 +++--- .../63b60cfaca25bb27edd40f62.md | 4 +- .../63b60d3c5048302906962231.md | 8 +-- .../63b614e6a1f7fe2cef6312dc.md | 8 +-- .../63b61584def8fa2ebcc259e0.md | 8 +-- .../63bf45ce0dc8d4270760c6d0.md | 12 ++-- .../63bf461011fca327d3b60fa8.md | 16 ++--- .../63bf47fd40599f29827f484d.md | 6 +- .../63c1dfbd56c71e278800010c.md | 10 +-- .../63c216da562fbb3957b9cb2c.md | 6 +- .../63c21839f56eaf3ef4e027c4.md | 2 +- .../63c2194dce265f429300c8b1.md | 6 +- .../63c21d4f48267a47c2946788.md | 12 ++-- .../63c8be904ffff922f3c6f8d0.md | 10 +-- .../63c9bcc26219e7090da0f549.md | 6 +- .../63c9bce376ca4f09c15a3768.md | 12 ++-- .../63c9bef7fec05c0d38853828.md | 8 +-- .../63c9c09a7daa4f0ff92c4023.md | 8 +-- .../63c9e3a83bb3e61a80eea564.md | 12 ++-- .../63c9e45519caf31b987fbb5f.md | 8 +-- .../63c9e6b7c0303524af2d0bc2.md | 4 +- .../63c9e7d5b21eee2776ecc226.md | 10 +-- .../63c9e84c9fe8ca28c4101189.md | 12 ++-- .../63c9ea23dbadbf2c2764e3f5.md | 10 +-- .../63c9ebb7b12bca3025b0a935.md | 10 +-- .../63c9ec044acedf312c4974ff.md | 8 +-- ...-setters-to-control-access-to-an-object.md | 63 ++++++------------- 66 files changed, 359 insertions(+), 602 deletions(-) diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index bfa407a3156..6b2419014f0 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -61,80 +61,53 @@ console.log(novel.writer); يجب أن يكون `Thermostat` بنوع `class` مع طريقة `constructor` محددة. ```js -assert( - typeof Thermostat === 'function' && - typeof Thermostat.constructor === 'function' -); +assert.isFunction(Thermostat); +assert.isFunction(Thermostat?.constructor); ``` -يجب استخدام كلمة `class`. +The `class` keyword should be used. ```js -assert(code.match(/class/g)); +assert.match(code, /class/); ``` `Thermostat` يجب أن يتم انشاء مثيل له. ```js -assert( - (() => { - const t = new Thermostat(122); - return typeof t === 'object'; - })() -); +const _t = new Thermostat(122); +assert.isObject(_t); ``` عند إنشاء مثيل بقيمة فهرنهايت، يجب أن يضبط `Thermostat` درجة الحرارة الصحيحة `temperature`. ```js -assert( - (() => { - const t = new Thermostat(122); - return t.temperature === 50; - })() -); +const _t = new Thermostat(122); +assert.strictEqual(_t?.temperature, 50); ``` يجب تعريف `getter`. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.get === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.get); ``` يجب تعريف `setter`. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.set === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.set); ``` استدعاء `setter` مع قيمة مئوية يجب أن تحدد `temperature`. ```js -assert( - (() => { - const t = new Thermostat(32); - t.temperature = 26; - const u = new Thermostat(32); - u.temperature = 50; - return t.temperature === 26 && u.temperature === 50; - })() -); +const _t = new Thermostat(32); +_t.temperature = 26; +const _u = new Thermostat(32); +_u.temperature = 50; +assert.approximately(_t.temperature, 26, 0.1); +assert.approximately(_u.temperature, 50, 0.1); ``` # --seed-- diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index 25eb8956416..75226a2cb8d 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -61,80 +61,53 @@ console.log(novel.writer); `Thermostat` 應該是一個具有 `constructor` 方法的 `class`。 ```js -assert( - typeof Thermostat === 'function' && - typeof Thermostat.constructor === 'function' -); +assert.isFunction(Thermostat); +assert.isFunction(Thermostat?.constructor); ``` -應該使用 `class` 關鍵詞。 +The `class` keyword should be used. ```js -assert(code.match(/class/g)); +assert.match(code, /class/); ``` `Thermostat` 應該可以被實例化。 ```js -assert( - (() => { - const t = new Thermostat(122); - return typeof t === 'object'; - })() -); +const _t = new Thermostat(122); +assert.isObject(_t); ``` 當實例化華氏溫度值時,`Thermostat` 應該被設置爲正確的 `temperature`。 ```js -assert( - (() => { - const t = new Thermostat(122); - return t.temperature === 50; - })() -); +const _t = new Thermostat(122); +assert.strictEqual(_t?.temperature, 50); ``` 應該定義一個 `getter`。 ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.get === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.get); ``` 應該定義一個 `setter`。 ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.set === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.set); ``` 調用帶有攝氏溫度值的 `setter` 應該設置 `temperature`。 ```js -assert( - (() => { - const t = new Thermostat(32); - t.temperature = 26; - const u = new Thermostat(32); - u.temperature = 50; - return t.temperature === 26 && u.temperature === 50; - })() -); +const _t = new Thermostat(32); +_t.temperature = 26; +const _u = new Thermostat(32); +_u.temperature = 50; +assert.approximately(_t.temperature, 26, 0.1); +assert.approximately(_u.temperature, 50, 0.1); ``` # --seed-- diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index 70ce5ee52eb..0aac6bddb02 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -61,80 +61,53 @@ console.log(novel.writer); `Thermostat` 应该是一个具有 `constructor` 方法的 `class`。 ```js -assert( - typeof Thermostat === 'function' && - typeof Thermostat.constructor === 'function' -); +assert.isFunction(Thermostat); +assert.isFunction(Thermostat?.constructor); ``` -应该使用 `class` 关键词。 +The `class` keyword should be used. ```js -assert(code.match(/class/g)); +assert.match(code, /class/); ``` `Thermostat` 应该可以被实例化。 ```js -assert( - (() => { - const t = new Thermostat(122); - return typeof t === 'object'; - })() -); +const _t = new Thermostat(122); +assert.isObject(_t); ``` 当实例化华氏温度值时,`Thermostat` 应该被设置为正确的 `temperature`。 ```js -assert( - (() => { - const t = new Thermostat(122); - return t.temperature === 50; - })() -); +const _t = new Thermostat(122); +assert.strictEqual(_t?.temperature, 50); ``` 应该定义一个 `getter`。 ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.get === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.get); ``` 应该定义一个 `setter`。 ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.set === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.set); ``` 调用带有摄氏温度值的 `setter` 应该设置 `temperature`。 ```js -assert( - (() => { - const t = new Thermostat(32); - t.temperature = 26; - const u = new Thermostat(32); - u.temperature = 50; - return t.temperature === 26 && u.temperature === 50; - })() -); +const _t = new Thermostat(32); +_t.temperature = 26; +const _u = new Thermostat(32); +_u.temperature = 50; +assert.approximately(_t.temperature, 26, 0.1); +assert.approximately(_u.temperature, 50, 0.1); ``` # --seed-- diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index 02a50278f63..f9d8aa44775 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -61,80 +61,53 @@ En otras palabras, estás abstrayendo los detalles de la implementación del usu `Thermostat` debe ser una `class` con un método `constructor` definido. ```js -assert( - typeof Thermostat === 'function' && - typeof Thermostat.constructor === 'function' -); +assert.isFunction(Thermostat); +assert.isFunction(Thermostat?.constructor); ``` -La palabra clave `class` debe ser utilizada. +The `class` keyword should be used. ```js -assert(code.match(/class/g)); +assert.match(code, /class/); ``` `Thermostat` debe ser capaz de ser instanciado. ```js -assert( - (() => { - const t = new Thermostat(122); - return typeof t === 'object'; - })() -); +const _t = new Thermostat(122); +assert.isObject(_t); ``` Cuando se crea una instancia con un valor de Fahrenheit, `Thermostat` debe establecer la temperatura (`temperature`) correcta. ```js -assert( - (() => { - const t = new Thermostat(122); - return t.temperature === 50; - })() -); +const _t = new Thermostat(122); +assert.strictEqual(_t?.temperature, 50); ``` Un `getter` debe ser definido. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.get === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.get); ``` Un `setter` debe ser definido. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.set === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.set); ``` Llamar al `setter` con un valor Celsius debe establecer `temperature`. ```js -assert( - (() => { - const t = new Thermostat(32); - t.temperature = 26; - const u = new Thermostat(32); - u.temperature = 50; - return t.temperature === 26 && u.temperature === 50; - })() -); +const _t = new Thermostat(32); +_t.temperature = 26; +const _u = new Thermostat(32); +_u.temperature = 50; +assert.approximately(_t.temperature, 26, 0.1); +assert.approximately(_u.temperature, 50, 0.1); ``` # --seed-- diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index eac1a50eefb..d17adc6c8c5 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -61,80 +61,53 @@ Mit anderen Worten: Du abstrahierst die Implementierungsdetails vom Benutzer. `Thermostat` sollte eine `class` mit einer definierten `constructor`-Methode sein. ```js -assert( - typeof Thermostat === 'function' && - typeof Thermostat.constructor === 'function' -); +assert.isFunction(Thermostat); +assert.isFunction(Thermostat?.constructor); ``` -Das Schlüsselwort `class` sollte verwendet werden. +The `class` keyword should be used. ```js -assert(code.match(/class/g)); +assert.match(code, /class/); ``` `Thermostat` sollte instanziiert werden können. ```js -assert( - (() => { - const t = new Thermostat(122); - return typeof t === 'object'; - })() -); +const _t = new Thermostat(122); +assert.isObject(_t); ``` Wenn du mit einem Fahrenheit-Wert instanziiert wirst, sollte `Thermostat` die richtige Temperatur (`temperature`) einstellen. ```js -assert( - (() => { - const t = new Thermostat(122); - return t.temperature === 50; - })() -); +const _t = new Thermostat(122); +assert.strictEqual(_t?.temperature, 50); ``` Es sollte ein `getter` definiert werden. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.get === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.get); ``` Es sollte ein `setter` definiert werden. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.set === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.set); ``` Der Aufruf des `setter` mit einem Celsius-Wert sollte die Temperatur (`temperature`) einstellen. ```js -assert( - (() => { - const t = new Thermostat(32); - t.temperature = 26; - const u = new Thermostat(32); - u.temperature = 50; - return t.temperature === 26 && u.temperature === 50; - })() -); +const _t = new Thermostat(32); +_t.temperature = 26; +const _u = new Thermostat(32); +_u.temperature = 50; +assert.approximately(_t.temperature, 26, 0.1); +assert.approximately(_u.temperature, 50, 0.1); ``` # --seed-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61b306305810f1c9040ce5a2.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61b306305810f1c9040ce5a2.md index 8bd95344b1f..bc9a69852e2 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61b306305810f1c9040ce5a2.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61b306305810f1c9040ce5a2.md @@ -7,9 +7,9 @@ dashedName: step-87 # --description-- -As you can see, you added a simple red shadow around your marker that's 5 pixels to the right, and 5 pixels down. +Wie du sehen kannst, hast du einen einfachen roten Schatten um deine Markierung herum hinzugefügt, der 5 Pixel nach rechts und 5 Pixel nach unten reicht. -But what if you wanted to position your shadow on the opposite side? Du kannst dies tun, indem du negative Werte für `offsetX` und `offsetY` verwendest. +Was aber, wenn du deinen Schatten auf der gegenüberliegenden Seite positionieren möchtest? Du kannst dies tun, indem du negative Werte für `offsetX` und `offsetY` verwendest. Update the values for the `box-shadow` property, and set `offsetX` to `-5px`, and `offsetY` to `-5px`. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6165d3b702a5d92ad970b30c.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6165d3b702a5d92ad970b30c.md index 0f5107d489f..a9fcc88aec2 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6165d3b702a5d92ad970b30c.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/6165d3b702a5d92ad970b30c.md @@ -17,7 +17,7 @@ Du solltest ein `h1`-Element erstellen. assert.exists(document.querySelector('h1')); ``` -Your `h1` element should come after your `img` element. +Dein `h1`-Element sollte nach deinem `img`-Element stehen. ```js assert(document.querySelector('h1')?.previousElementSibling?.localName === 'img'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d41d40bf9b2aaea5d520.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d41d40bf9b2aaea5d520.md index 928c0a16b86..2218889a51c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d41d40bf9b2aaea5d520.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d41d40bf9b2aaea5d520.md @@ -7,7 +7,7 @@ dashedName: step-27 # --description-- -Position the sun in the top right corner of the screen such that `75px` of its top and right edges are off screen. +Positioniere die Sonne in der oberen rechten Ecke des Bildschirms, so dass `75px` ihres oberen und rechten Rands außerhalb des Bildschirms liegen. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/61993cf26a8e0f0a553db223.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/61993cf26a8e0f0a553db223.md index 526eba549e5..f815a619b00 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/61993cf26a8e0f0a553db223.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/61993cf26a8e0f0a553db223.md @@ -7,13 +7,13 @@ dashedName: step-31 # --description-- -_Most_ penguins do not have a square head. +Die _meisten_ Pinguine haben keinen quadratischen Kopf. Gib dem Pinguin einen leicht ovalen Kopf, indem du den Radius der oberen Ecken auf `70%` und den Radius der unteren Ecken auf `65%` einstellst. # --hints-- -You should give `.penguin-head` a `border-radius` of `70% 70% 65% 65%`. +Du solltest `.penguin-head` eine `border-radius` mit dem Wert `70% 70% 65% 65%` zuweisen. ```js // Maybe check for individual border-radius properties? diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d23089e787e216a7043d6.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d23089e787e216a7043d6.md index 17eb4c11dc2..4020f8abc4d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d23089e787e216a7043d6.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d23089e787e216a7043d6.md @@ -11,7 +11,7 @@ dashedName: step-85 # --hints-- -You should give `.foot` a `z-index` of `--fcc-expected--`, but found `--fcc-actual--`. +Du solltest `.foot` eine `z-index`-Eigenschaft mit dem Wert `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.foot')?.zIndex, '-1'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/61a8fe15a6a31306e60d1e89.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/61a8fe15a6a31306e60d1e89.md index 25db0ea0d3f..622f5480b12 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/61a8fe15a6a31306e60d1e89.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/61a8fe15a6a31306e60d1e89.md @@ -11,13 +11,13 @@ Normalisiere deine Seite, indem du `width` auf `100%`, und `height` auf `100vh` # --hints-- -You should give `body` a `width` of `--fcc-expected--`, but found `--fcc-actual--`. +Du solltest `body` eine `width` mit dem Wert `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.width, '100%'); ``` -You should give `body` a `height` of `--fcc-expected--`, but found `--fcc-actual--`. +Du solltest `body` eine `height` mit dem Wert `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.height, '100vh'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98fa.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98fa.md index 4c0cbd44427..173c4dc946e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98fa.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98fa.md @@ -7,7 +7,7 @@ dashedName: step-50 # --description-- -Erstelle eine neue Variable in `:root` namens `window-color2` mit einem Wert von `#8cd9b3`. This will be used as the secondary color for this building. +Erstelle eine neue Variable in `:root` namens `window-color2` mit einem Wert von `#8cd9b3`. Dies wird als Sekundärfarbe für dieses Gebäude verwendet. # --hints-- @@ -17,7 +17,7 @@ Du solltest innerhalb `:root` eine neue Eigenschaftsvariable namens `window-colo assert.exists(new __helpers.CSSHelp(document).getStyle(':root')?.getPropertyValue('--window-color2')); ``` -You should give `window-color2` a value of `#8cd9b3`. +Du solltest `window-color2` den Wert `#8cd9b3` zuweisen. ```js assert.equal(new __helpers.CSSHelp(document).getStyle(':root')?.getPropertyValue('--window-color2').trim(), '#8cd9b3'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993b.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993b.md index 84aa4b0723c..d3c4b4bd036 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993b.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e993b.md @@ -9,7 +9,7 @@ dashedName: step-115 Kopiere und füge deine ganze `sky`-Klasse zusammen mit allen Eigenschaften und Werten in die Media Query ein. Du wirst ein anderes Farbschema für die Silhouette erstellen, welche sie von Tag zu Nacht ändert. -Note: You are going to need to scroll past the editable region to copy the class. +Notiz: Du musst hinter den editierbaren Bereich scrollen, um die Klasse zu kopieren. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17dc8f86c76b9248c6eb5.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17dc8f86c76b9248c6eb5.md index 980f15c53d0..5d0fa904718 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17dc8f86c76b9248c6eb5.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17dc8f86c76b9248c6eb5.md @@ -27,7 +27,7 @@ Dein Kommentar sollte mit `-->` enden. Es fehlen ein oder mehrere Zeichen, die assert(code.match(/-->/)); ``` -Your code should not have extra opening/closing comment characters. Dir wird ein zusätziches `` im Browser angezeigt. +Dein Code sollte keine zusätzlichen öffnenden/abschließenden Kommentarzeichen enthalten. Dir wird ein zusätziches `` im Browser angezeigt. ```js const noSpaces = code.replace(/\s/g, ''); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804d1.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804d1.md index 312e90caee4..712d869b023 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804d1.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804d1.md @@ -13,7 +13,7 @@ Füge nach dem `figure`-Element ein weiteres `h3`-Element mit dem folgenden Text # --hints-- -Es sollte ein `h3`-Element direkt über dem schließenden Tag des zweiten `section`-Elements geben. Make sure it has an opening and closing tag. +Es sollte ein `h3`-Element direkt über dem schließenden Tag des zweiten `section`-Elements geben. Stelle sicher, dass es ein öffnendes und abschließendes Tag enthält. ```js assert( diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804d9.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804d9.md index ed55e111a2c..8c98d83fe40 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804d9.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804d9.md @@ -7,7 +7,7 @@ dashedName: step-40 # --description-- -Placeholder text is used to give people a hint about what kind of information to enter into an input. For example, ``. +Platzhaltertext wird verwendet, um Personen einen Hinweis darauf zu geben, welche Art von Informationen sie in das Eingabefeld eintragen sollen. Zum Beispiel: ``. Add the placeholder text `cat photo URL` to your `input` element. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md index 1c5f3050047..21fd985a3ef 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5ef9b03c81a63668521804de.md @@ -25,14 +25,14 @@ assert( ); ``` -Beide Radio-Buttons sollten ein `name`-Attribut enthalten. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names. +Beide Radio-Buttons sollten ein `name`-Attribut enthalten. Überprüfe, ob nach dem Namen des öffnenden Tags ein Leerzeichen steht und/oder ob vor allen Attributnamen Leerzeichen stehen. ```js const radioButtons = [...document.querySelectorAll('input[type="radio"]')]; assert(radioButtons.every((btn) => btn.hasAttribute('name'))); ``` -Beide Radio-Buttons sollten ein `type`-Attribut besitzen. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names. +Beide Radio-Buttons sollten ein `type`-Attribut besitzen. Überprüfe, ob nach dem Namen des öffnenden Tags ein Leerzeichen steht und/oder ob vor allen Attributnamen Leerzeichen stehen. ```js const radioButtons = [...document.querySelectorAll('input')]; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f05a1d8e233dff4a68508d8.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f05a1d8e233dff4a68508d8.md index 461a02c92ec..65d82c439d8 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f05a1d8e233dff4a68508d8.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f05a1d8e233dff4a68508d8.md @@ -53,13 +53,13 @@ Your new `input` should have a `type` attribute with the value `radio`. assert(document.querySelector('label input[id="outdoor"][type="radio"]')); ``` -You should not add any new elements other than an `input` nested in a `label`. +Du solltest keine neuen Elemente außer einem `input`-Element hinzufügen, das in einem `label`-Element eingebettet ist. ```js assert(document.querySelector('label input[id="outdoor"]:only-child')); ``` -There should be no text to the left of your new `input`. +Links neben deinem neuen `input`-Element sollte kein Text stehen. ```js const outdoorBtn = document.querySelector('label input[id="outdoor"]'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f0d4d04b435f13ab6550053.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f0d4d04b435f13ab6550053.md index 5c5c44f944b..f898506a5d6 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f0d4d04b435f13ab6550053.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5f0d4d04b435f13ab6550053.md @@ -37,7 +37,7 @@ Dein `legend`-Element sollte ein schließendes Tag haben. Schließende Tags habe assert(code.match(/<\/legend\>/g).length === 2); ``` -Das `legend`-Element sollte den Text `What's your cat's personality?` enthalten. You have either omitted the text or have a typo. +Das `legend`-Element sollte den Text `What's your cat's personality?` enthalten. Du hast entweder den Text weggelassen oder dir ist ein Tippfehler unterlaufen. ```js const secondFieldset = $('fieldset')[1]; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f1a9cbd23023082e149fee.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f1a9cbd23023082e149fee.md index ac3ded24c9f..54ff3f82510 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f1a9cbd23023082e149fee.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f1a9cbd23023082e149fee.md @@ -7,7 +7,7 @@ dashedName: step-10 # --description-- -Das ist besser. Now, make the background easy on the eyes, by changing the `body` `background-color` to `#1b1b32`. Ändere dann, um den Text zu sehen, die `color` auf `#f5f6f7`. +Das ist besser. Gestalte jetzt den Hintergrund optisch ansprechend, indem du die `body` `background-color` auf `#1b1b32` setzt. Ändere dann, um den Text zu sehen, die `color` auf `#f5f6f7`. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f83e7bfc09900959f41e20.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f83e7bfc09900959f41e20.md index 4f4cadbd064..081bb968985 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f83e7bfc09900959f41e20.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60f83e7bfc09900959f41e20.md @@ -7,13 +7,13 @@ dashedName: step-22 # --description-- -Certain `type` attribute values come with built-in form validation. Zum Beispiel erfordert `type="email"`, dass der Wert eine gültige E-Mail-Adresse ist. +Bestimmte `type`-Attributwerte besitzen eine eingebaute Formularprüfung. Zum Beispiel erfordert `type="email"`, dass der Wert eine gültige E-Mail-Adresse ist. -Add custom validation to the password `input` element, by adding a `minlength` attribute with a value of `8`. Doing so prevents inputs of less than 8 characters being submitted. +Add custom validation to the password `input` element, by adding a `minlength` attribute with a value of `8`. Dadurch wird verhindert, dass Eingaben mit weniger als 8 Zeichen übermittelt werden. # --hints-- -You should give the password `input` element a `minlength` attribute. +Du solltest dem `input`-Passwort-Element ein `minlength`-Attribut zuweisen. ```js assert.notEqual(document.querySelector('input[type="password"]')?.minLength, -1); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab4a123ce4b04526b082b.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab4a123ce4b04526b082b.md index 4e617d52986..fb90fc86757 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab4a123ce4b04526b082b.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab4a123ce4b04526b082b.md @@ -7,7 +7,7 @@ dashedName: step-28 # --description-- -You only want one radio input to be selectable at a time. However, the form does not know the radio inputs are related. +Es soll jeweils nur eine Radio-Input-Element gleichzeitig wählbar sein. Allerdings weiß das Formular nicht, dass die Radio-Input-Elemente miteinander verbunden sind. To relate the radio inputs, give them the same `name` attribute with a value of `account-type`. Now, it is not possible to select both radio inputs at the same time. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60facde2d0dc61085b41063f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60facde2d0dc61085b41063f.md index 313f17a8cdb..013951ed034 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60facde2d0dc61085b41063f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60facde2d0dc61085b41063f.md @@ -25,7 +25,7 @@ Du solltest dem `label`-Element den Text `Provide a bio:` zuweisen. assert.match(document.querySelector('fieldset:nth-child(3) > label:nth-child(4)')?.innerText, /Provide a bio/); ``` -You should nest a `textarea` element within the `label`. +Du solltest ein `textarea`-Element innerhalb des `label`-Elements einbetten. ```js assert.exists(document.querySelector('fieldset:nth-child(3) > label:nth-child(4) > textarea')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60ffe9cb47809106eda2f2c9.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60ffe9cb47809106eda2f2c9.md index 395731fcf75..b07a5b6bc40 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60ffe9cb47809106eda2f2c9.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60ffe9cb47809106eda2f2c9.md @@ -7,7 +7,7 @@ dashedName: step-60 # --description-- -Lastly, for the submit button, you want to separate it from the `fieldset` above, and adjust its width to never be below `300px`. +Zum Schluss möchtest du den Bestätigungsbutton vom darüber liegenden `fieldset`-Element trennen und dessen Breite so anpassen, dass diese niemals unter `300px` liegt. Ändere die `margin`-Eigenschaft, um `1em` oben und unten hinzuzufügen, während du die Margin-Eigenschaft rechts und links auf `auto` eingestellt lässt. Stelle dann die Breite wie oben beschrieben ein. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd8e491324ce717da97ffe.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd8e491324ce717da97ffe.md index 7b8e62eb47f..ef775c6217d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd8e491324ce717da97ffe.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd8e491324ce717da97ffe.md @@ -23,7 +23,7 @@ Your `tr` element should have a `td` element as the first child. assert(document.querySelectorAll('table')?.[1]?.querySelector('tr')?.children?.[0]?.localName === 'td'); ``` -Your `tr` element should have three `th` elements, after the `td` element. +Dein `tr`-Element sollte nach dem `td`-Element drei `th`-Elemente enthalten. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tr')?.children?.[1]?.localName === 'th'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd933ba685de776a94997e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd933ba685de776a94997e.md index 2e395db026b..8cb49cce247 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd933ba685de776a94997e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd933ba685de776a94997e.md @@ -9,7 +9,7 @@ dashedName: step-21 Within the first `tr`, add a `th` element with the text `Loans The outstanding balance on our startup loan.`. Wrap that text, except for `Loans`, within a `span` element with the `class` set to `description`. -Add three `td` elements below that, and give them the following text, in order: `$500`, `$250`, and `$0`. Gib den drei `td`-Elementen eine `class`, die auf `current` eingestellt ist. +Füge drei `td`-Elemente darunter hinzu und gib ihnen den folgenden Text in dieser Reihenfolge: `$500`, `$250` und `$0`. Gib den drei `td`-Elementen eine `class`, die auf `current` eingestellt ist. # --hints-- @@ -55,7 +55,7 @@ Dein zweites `td`-Element sollte den Text `$250` enthalten. assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[0]?.querySelectorAll('td')?.[1]?.textContent === '$250'); ``` -Your third `td` element should have the text `$0`. +Dein drittes `td`-Element sollte den Text `$0` enthalten. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[0]?.querySelectorAll('td')?.[2]?.textContent === '$0'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e6afc009b450a437940a1.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e6afc009b450a437940a1.md index 8daa98c5eff..3629df2cb77 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e6afc009b450a437940a1.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e6afc009b450a437940a1.md @@ -7,7 +7,7 @@ dashedName: step-1 # --description-- -Beginne mit der grundlegenden HTML-Struktur. Add a `DOCTYPE` declaration and `html`, `head`, `body`, and `title` elements. +Beginne mit der grundlegenden HTML-Struktur. Füge eine `DOCTYPE`-Deklaration sowie `html`-, `head`-, `body`- und `title`-Elemente hinzu. Set the language of this page to English. Setze den `title` auf `Piano`. @@ -49,7 +49,7 @@ Dein `html`-Element sollte ein schließendes Tag haben. assert(code.match(/<\/html\s*>/)); ``` -Your `DOCTYPE` declaration should be at the beginning of your HTML. +Deine `DOCTYPE`-Deklaration sollte am Anfang deines HTML-Codes stehen. ```js assert(__helpers.removeHtmlComments(code).match(/^\s*/i)); @@ -97,7 +97,7 @@ Das `body`-Element sollte sich innerhalb des `html`-Elements befinden. assert([...document.querySelector('html')?.children].some(x => x?.localName === 'body')); ``` -Your code should have a `title` element. +Dein Code sollte ein `title`-Element enthalten. ```js const title = document.querySelector('title'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad69978.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad69978.md index e16c4b9a70a..d9c22132014 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad69978.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad69978.md @@ -7,7 +7,7 @@ dashedName: step-15 # --description-- -Use margins to adjust the spacing outside of an element. +Verwende Margins, um den Abstand außerhab eines Elements anzupassen. Using the `margin` property, give the `.frame` element vertical margin of `20px`, and horizontal margin of `auto`. Dies wird den Rahmen um 20 Pixel nach unten verschieben und horizontal auf der Seite zentrieren. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad6998f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad6998f.md index a09559bf88f..210966c5454 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad6998f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-the-css-box-model-by-building-a-rothko-painting/60a3e3396c7b40068ad6998f.md @@ -9,7 +9,7 @@ dashedName: step-37 Die Rechtecke sind zu klein und ihre Kanten haben keine weiche Qualität eines Bildes. -Increase the area and soften the edges of `.one` by setting its `box-shadow` to `0 0 3px 3px #efb762`. +Vergrößere die Fläche und mache die Kanten von `.one` weicher, indem du dessen `box-shadow` auf `0 0 3px 3px #efb762` setzt. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index 9454ef6cbf6..2c549484bfd 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -7,7 +7,7 @@ dashedName: step-20 # --description-- -Your new class does not have any styling yet. Create a `.bold` selector and give it a `font-weight` property set to `800` to make the text bold. +Deine neue Klasse besitzt noch kein Styling. Create a `.bold` selector and give it a `font-weight` property set to `800` to make the text bold. Fahre fort und entferne auch die `font-weight`-Eigenschaft aus deinem `h1`-Selektor. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 65455ff9564..59ad61367ac 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -11,7 +11,7 @@ Die unteren Ränder unter deinen `% Daily Value *`- und `Saturated Fat 1g 5%`-El # --hints-- -Your `p` element with the text `% Daily Value *` should have `no-divider` added to the `class` attribute. Do not remove the existing classes. +Dein `p`-Element mit dem Text `% Daily Value *` sollte `no-divider` zu dem `class`-Attribut hinzugefügt haben. Do not remove the existing classes. ```js const p = document.querySelector('.daily-value.small-text')?.firstElementChild; @@ -19,7 +19,7 @@ assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); ``` -Your `p` element with the text `Saturated Fat 1g 5%` should have `no-divider` added to the `class` attribute. Do not remove the existing classes. +Dein `p`-Element mit dem Text `Saturated Fat 1g 5%` sollte `no-divider` zum `class`-Attribut hinzugefügt haben. Do not remove the existing classes. ```js const p = document.querySelector('.daily-value.small-text')?.lastElementChild; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index 8e7e694bf48..e1f685c0a6f 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -17,7 +17,7 @@ Du solltest ein neues `p`-Element am Ende deines `.daily-value`-Elements erstell assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` -Your new `p` element should have the `class` attribute set to `no-divider`. +Dein neues `p`-Element sollte das `class`-Attribut auf `no-divider` gesetzt haben. ```js assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index 6d487f214b4..f0efc2c6bc6 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -61,80 +61,53 @@ In altre parole, stai astraendo i dettagli di implementazione dall'utente. `Thermostat` dovrebbe essere una `class` con un metodo `constructor` definito. ```js -assert( - typeof Thermostat === 'function' && - typeof Thermostat.constructor === 'function' -); +assert.isFunction(Thermostat); +assert.isFunction(Thermostat?.constructor); ``` -Dovrebbe essere usata la parola chiave `class`. +The `class` keyword should be used. ```js -assert(code.match(/class/g)); +assert.match(code, /class/); ``` `Thermostat` dovrebbe poter essere istanziato. ```js -assert( - (() => { - const t = new Thermostat(122); - return typeof t === 'object'; - })() -); +const _t = new Thermostat(122); +assert.isObject(_t); ``` Quando istanziato con un valore in Fahrenheit, `Thermostat` dovrebbe impostare la `temperature` corretta. ```js -assert( - (() => { - const t = new Thermostat(122); - return t.temperature === 50; - })() -); +const _t = new Thermostat(122); +assert.strictEqual(_t?.temperature, 50); ``` Dovrebbe essere definita una funzione `getter`. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.get === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.get); ``` Dovrebbe essere definita una funzione `setter`. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.set === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.set); ``` Chiamando il `setter` con un valore in Celsius dovrebbe essere impostata la `temperature`. ```js -assert( - (() => { - const t = new Thermostat(32); - t.temperature = 26; - const u = new Thermostat(32); - u.temperature = 50; - return t.temperature === 26 && u.temperature === 50; - })() -); +const _t = new Thermostat(32); +_t.temperature = 26; +const _u = new Thermostat(32); +_u.temperature = 50; +assert.approximately(_t.temperature, 26, 0.1); +assert.approximately(_u.temperature, 50, 0.1); ``` # --seed-- diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index a2dc6593c49..a4b8592d5d8 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -61,80 +61,53 @@ getter と setter を使用することで、 プログラマーが API の作 `Thermostat` は、`constructor` メソッドを定義した `class` である必要があります。 ```js -assert( - typeof Thermostat === 'function' && - typeof Thermostat.constructor === 'function' -); +assert.isFunction(Thermostat); +assert.isFunction(Thermostat?.constructor); ``` -`class` キーワードを使用する必要があります。 +The `class` keyword should be used. ```js -assert(code.match(/class/g)); +assert.match(code, /class/); ``` `Thermostat` をインスタンス化できるようにする必要があります。 ```js -assert( - (() => { - const t = new Thermostat(122); - return typeof t === 'object'; - })() -); +const _t = new Thermostat(122); +assert.isObject(_t); ``` 華氏値でインスタンス化された場合、`Thermostat` は正しい `temperature` を設定する必要があります。 ```js -assert( - (() => { - const t = new Thermostat(122); - return t.temperature === 50; - })() -); +const _t = new Thermostat(122); +assert.strictEqual(_t?.temperature, 50); ``` `getter` を定義する必要があります。 ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.get === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.get); ``` `setter` を定義する必要があります。 ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.set === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.set); ``` `setter` が摂氏値で呼び出されたとき、`temperature` を設定する必要があります。 ```js -assert( - (() => { - const t = new Thermostat(32); - t.temperature = 26; - const u = new Thermostat(32); - u.temperature = 50; - return t.temperature === 26 && u.temperature === 50; - })() -); +const _t = new Thermostat(32); +_t.temperature = 26; +const _u = new Thermostat(32); +_u.temperature = 50; +assert.approximately(_t.temperature, 26, 0.1); +assert.approximately(_u.temperature, 50, 0.1); ``` # --seed-- diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md index b39387de414..9e04cfcef6b 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.md @@ -61,80 +61,53 @@ Em outras palavras, você está abstraindo detalhes de implementação do usuár `Thermostat` deve ser uma `class` com um método `constructor` definido. ```js -assert( - typeof Thermostat === 'function' && - typeof Thermostat.constructor === 'function' -); +assert.isFunction(Thermostat); +assert.isFunction(Thermostat?.constructor); ``` -A palavra-chave `class` deve ser usado. +A palavra-chave `class` deve ser usada. ```js -assert(code.match(/class/g)); +assert.match(code, /class/); ``` `Thermostat` deve ser possível de ser instanciado. ```js -assert( - (() => { - const t = new Thermostat(122); - return typeof t === 'object'; - })() -); +const _t = new Thermostat(122); +assert.isObject(_t); ``` Quando instanciado com um valor Fahrenheit, `Thermostat` deve definir a `temperature` correta. ```js -assert( - (() => { - const t = new Thermostat(122); - return t.temperature === 50; - })() -); +const _t = new Thermostat(122); +assert.strictEqual(_t?.temperature, 50); ``` Um `getter` deve ser definido. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.get === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.get); ``` Um `setter` deve ser definido. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.set === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.set); ``` Chamando um `setter` com um valor Celsius deve definir a `temperature`. ```js -assert( - (() => { - const t = new Thermostat(32); - t.temperature = 26; - const u = new Thermostat(32); - u.temperature = 50; - return t.temperature === 26 && u.temperature === 50; - })() -); +const _t = new Thermostat(32); +_t.temperature = 26; +const _u = new Thermostat(32); +_u.temperature = 50; +assert.approximately(_t.temperature, 26, 0.1); +assert.approximately(_u.temperature, 50, 0.1); ``` # --seed-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b6075a62883218d282504c.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b6075a62883218d282504c.md index 617be6fa9e6..552aec2bf34 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b6075a62883218d282504c.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b6075a62883218d282504c.md @@ -7,25 +7,25 @@ dashedName: step-3 # --description-- -Your `input` element needs some additional attributes. Give it a `type` set to `number` to only allow numeric inputs, a `min` attribute set to `0` to only allow positive numbers, and a `placeholder` set to `Daily calorie budget`. +O elemento `input` precisa de alguns atributos adicionais. Dê a ele um `type` definido como `number` para que permita apenas entradas numéricas, um atributo `min` definido como `0` para que permita apenas números positivos e um `placeholder` definido como `Daily calorie budget`. -Finally, mark the `input` element as `required`. +Por fim, marque o elemento `input` como `required` (obrigatório). # --hints-- -Your `input` element should have a `type` attribute set to `number`. +O elemento `input` deve ter o atributo `type` definido como `number`. ```js assert.equal(document.querySelector('form input').type, 'number'); ``` -Your `input` element should have a `min` attribute set to `0`. +O elemento `input` deve ter o atributo `min` definido como `0`. ```js assert.equal(document.querySelector('form input').min, '0'); ``` -Your `input` element should have a `placeholder` attribute set to `Daily calorie budget`. +O elemento `input` deve ter o atributo `placeholder` definido como `Daily calorie budget`. ```js assert.equal(document.querySelector('form input').placeholder, 'Daily calorie budget'); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60821c855d01b1eda3c0b.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60821c855d01b1eda3c0b.md index 2fdd6882211..cf592218f89 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60821c855d01b1eda3c0b.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60821c855d01b1eda3c0b.md @@ -7,47 +7,47 @@ dashedName: step-5 # --description-- -Now create a `fieldset` with an `id` set to `lunch`, and a corresponding `legend` and `div` element. +Agora, crie um `fieldset` com um `id` definido como `lunch` e elementos `legend` e `div` correspondentes. # --hints-- -You should create a second `fieldset` element in your `form`. +Você deve criar um segundo elemento `fieldset` no `form`. ```js assert.exists(document.querySelectorAll('form fieldset')[1]); ``` -Your second `fieldset` element should come after your first `fieldset` element. +O segundo elemento `fieldset` deve vir depois do primeiro elemento `fieldset`. ```js assert.equal(document.querySelectorAll('form fieldset')[1]?.previousElementSibling?.tagName, "FIELDSET"); ``` -Your second `fieldset` element should have an `id` set to `lunch`. +O segundo elemento `fieldset` deve ter o atributo `id` definido como `lunch`. ```js assert.equal(document.querySelectorAll('form fieldset')[1]?.id, "lunch"); ``` -Your second `fieldset` element should contain a `legend` element. +O segundo elemento `fieldset` deve conter um elemento `legend`. ```js assert.exists(document.querySelectorAll('form fieldset')[1]?.querySelector('legend')); ``` -Your new `legend` element should have the text `Lunch`. +O novo elemento `legend` deve conter o texto `Lunch`. ```js assert.equal(document.querySelectorAll('form fieldset')[1]?.querySelector('legend')?.innerText, "Lunch"); ``` -Your second `fieldset` element should contain a `div` element. +O segundo elemento `fieldset` deve conter um elemento `div`. ```js assert.exists(document.querySelectorAll('form fieldset')[1]?.querySelector('div')); ``` -Your new `div` element should have a `class` set to `input-container`. +O novo elemento `div` deve ter uma `class` definida como `input-container`. ```js assert.equal(document.querySelectorAll('form fieldset')[1]?.querySelector('div')?.className, "input-container"); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60aaaa65f8922bfce6b7e.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60aaaa65f8922bfce6b7e.md index 0fd3c650484..b554f6d71d3 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60aaaa65f8922bfce6b7e.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60aaaa65f8922bfce6b7e.md @@ -7,73 +7,73 @@ dashedName: step-9 # --description-- -In your `span` element, create a `label` element for an `entry-dropdown` and give it the text `Add food or exercise:`. Then create a `select` element with the `id` set to `entry-dropdown` and a `name` set to `options`. Below that, add a `button` element with the `id` set to `add-entry` and the text `Add Entry`. +No elemento `span`, crie um elemento `label` para um `entry-dropdown` e dê a ele o texto `Add food or exercise:`. Em seguida, crie um elemento `select` com `id` definido como `entry-dropdown` e um `name` definido como `options`. Abaixo disso, adicione um elemento `button` com o `id` definido como `add-entry` e o texto `Add Entry`. -Give your `button` element a `type` attribute set to `button` to prevent automatic form submission. +Dê ao elemento `button` um atributo `type` definido como `button` para evitar o envio automático do formulário. # --hints-- -You should add a `label` element to your `span` element. +Você deve adicionar um elemento `label` ao elemento `span`. ```js assert.exists(document.querySelector('.controls > span > label')); ``` -Your new `label` element should have a `for` attribute set to `entry-dropdown`. +O novo elemento `label` deve ter o atributo `for` definido como `entry-dropdown`. ```js assert.equal(document.querySelector('.controls > span > label')?.getAttribute('for'), 'entry-dropdown'); ``` -Your new `label` element should have the text `Add food or exercise:`. +O novo elemento `label` deve ter o texto `Add food or exercise:`. ```js assert.equal(document.querySelector('.controls > span > label')?.innerText, 'Add food or exercise:'); ``` -You should add a `select` element to your `span` element. +Você deve adicionar um elemento `select` ao elemento `span`. ```js assert.exists(document.querySelector('.controls > span > select')); ``` -Your `select` element should come after your `label` element. +O elemento `select` deve vir depois do elemento `label`. ```js assert(document.querySelector('.controls > span > select')?.previousElementSibling?.tagName === 'LABEL'); ``` -Your new `select` element should have an `id` attribute set to `entry-dropdown`. +O novo elemento `select` deve ter o atributo `id` definido como `entry-dropdown`. ```js assert.equal(document.querySelector('.controls > span > select')?.getAttribute('id'), 'entry-dropdown'); ``` -Your new `select` element should have a `name` attribute set to `options`. +O novo elemento `select` deve ter o atributo `name` definido como `options`. ```js assert.equal(document.querySelector('.controls > span > select')?.getAttribute('name'), 'options'); ``` -You should add a `button` element to your `span` element. +Você deve adicionar um elemento `button` ao elemento `span`. ```js assert.exists(document.querySelector('.controls > span > button')); ``` -Your `button` element should come after your `select` element. +O elemento `button` deve vir depois do elemento `select`. ```js assert(document.querySelector('.controls > span > button')?.previousElementSibling?.tagName === 'SELECT'); ``` -Your new `button` element should have an `id` attribute set to `add-entry`. +O novo elemento `button` deve ter um atributo `id` definido como `add-entry`. ```js assert.equal(document.querySelector('.controls > span > button')?.getAttribute('id'), 'add-entry'); ``` -Your new `button` element should have the text `Add Entry`. +O novo elemento `button` dever ter o texto `Add Entry`. ```js assert.equal(document.querySelector('.controls > span > button')?.innerText, 'Add Entry'); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60af1a0b9f7238a9dd294.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60af1a0b9f7238a9dd294.md index d404b8ee19a..bff59936584 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60af1a0b9f7238a9dd294.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60af1a0b9f7238a9dd294.md @@ -7,79 +7,79 @@ dashedName: step-10 # --description-- -Your select menu needs options for each of the food and exercise `fieldset` elements you created in the previous steps. Use the `option` element to create a new option for each `fieldset`. The `value` attribute of each option should be the `id` of the `fieldset`, and the text of each option should be the text of the `legend`. +O menu de seleção precisa de opções para cada um dos elementos `fieldset` de alimentos e exercícios que você criou nos passos anteriores. Use o elemento `option` para criar uma opção para cada `fieldset`. O atributo `value` de cada opção deve ser o `id` do `fieldset`. O texto de cada opção deve ser o texto de `legend`. -Set the `Breakfast` option as the `selected` option. +Defina a opção `Breakfast` como a opção `selected`. # --hints-- -You should create five `option` elements within your `select` element. +Você deve criar cinco elementos `option` dentro do elemento `select`. ```js assert.equal(document.querySelectorAll('.controls select option')?.length, 5); ``` -Your first `option` should have the text `Breakfast`. +O primeiro `option` deve ter o texto `Breakfast`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[0]?.textContent, 'Breakfast'); ``` -Your first `option` should have the `value` attribute set to `breakfast`. +O primeiro `option` deve ter o atributo `value` definido como `breakfast`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[0]?.value, 'breakfast'); ``` -Your second `option` should have the text `Lunch`. +O segundo `option` deve ter o texto `Lunch`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[1]?.textContent, 'Lunch'); ``` -Your second `option` should have the `value` attribute set to `lunch`. +O segundo `option` deve ter o atributo `value` definido como `lunch`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[1]?.value, 'lunch'); ``` -Your third `option` should have the text `Dinner`. +O terceiro `option` deve ter o texto `Dinner`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[2]?.textContent, 'Dinner'); ``` -Your third `option` should have the `value` attribute set to `dinner`. +O terceiro `option` deve ter o atributo `value` definido como `dinner`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[2]?.value, 'dinner'); ``` -Your fourth `option` should have the text `Snacks`. +O quarto `option` deve ter o texto `Snacks`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[3]?.textContent, 'Snacks'); ``` -Your fourth `option` should have the `value` attribute set to `snacks`. +O quarto `option` deve ter o atributo `value` definido como `snacks`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[3]?.value, 'snacks'); ``` -Your fifth `option` should have the text `Exercise`. +O quinto `option` deve ter o texto `Exercise`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[4]?.textContent, 'Exercise'); ``` -Your fifth `option` should have the `value` attribute set to `exercise`. +O quinto `option` deve ter o atributo `value` definido como `exercise`. ```js assert.equal(document.querySelectorAll('.controls select option')?.[4]?.value, 'exercise'); ``` -Your first `option` should be selected by default. +O primeiro `option` deve ser selecionado por padrão. ```js assert.isTrue(document.querySelectorAll('.controls select option')?.[0]?.getAttributeNames()?.includes('selected')); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60c09c5039f25a3b2dda9.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60c09c5039f25a3b2dda9.md index c0d6ec04875..a6fc5b32906 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60c09c5039f25a3b2dda9.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60c09c5039f25a3b2dda9.md @@ -7,9 +7,9 @@ dashedName: step-11 # --description-- -Create another `div` element. Within it, nest a `button` to `submit` the form, with an `id` set to `calculate-calories`. This button should have the text `Calculate Remaining Calories`. +Crie outro elemento `div`. Dentro dele, coloque um `button` para fazer o `submit` (envio) do formulário, com um `id` definido como `calculate-calories`. Esse botão deve ter o texto `Calculate Remaining Calories`. -Then add a `button` with the `id` set to `clear` to clear the form (don't forget to give it a `type` attribute that prevents it from submitting the form). This button needs the text `Clear`. +Em seguida, adicione um `button` com o `id` definido como `clear` para limpar o formulário (não se esqueça de dar a ele um atributo `type`, que o impeça de enviar o formulário). Esse botão precisa do texto `Clear`. # --hints-- @@ -19,49 +19,49 @@ Crie um segundo elemento `div`. assert.equal(document.querySelectorAll('form > div')?.length, 2); ``` -Your new `div` element should have a `button` element. +O novo elemento `div` deve ter um elemento `button`. ```js assert.exists(document.querySelectorAll('form > div')?.[1]?.querySelector('button')); ``` -Your `button` element should have a `type` attribute set to `submit`. +O elemento `button` deve ter o atributo `type` com o valor `submit`. ```js assert.equal(document.querySelectorAll('form > div')?.[1]?.querySelector('button')?.getAttribute('type'), 'submit'); ``` -Your `button` element should have an `id` attribute set to `calculate-calories`. +O elemento `button` deve ter o atributo `id` definido como `calculate-calories`. ```js assert.equal(document.querySelectorAll('form > div')?.[1]?.querySelector('button')?.getAttribute('id'), 'calculate-calories'); ``` -Your `button` element should have the text `Calculate Remaining Calories`. +O elemento `button` dever ter o texto `Calculate Remaining Calories`. ```js assert.equal(document.querySelectorAll('form > div')?.[1]?.querySelector('button')?.innerText, 'Calculate Remaining Calories'); ``` -Your `div` element should have a second `button` element. +O elemento `div` deve ter um segundo elemento `button`. ```js assert.exists(document.querySelectorAll('form > div')?.[1]?.querySelectorAll('button')?.[1]); ``` -Your second `button` element should have a `type` attribute set to `button`. +O segundo elemento `button` deve ter o atributo `type` definido como `button`. ```js assert.equal(document.querySelectorAll('form > div')?.[1]?.querySelectorAll('button')?.[1]?.getAttribute('type'), 'button'); ``` -Your second `button` element should have an `id` attribute set to `clear`. +O segundo elemento `button` deve ter um atributo `id` definido como `clear`. ```js assert.equal(document.querySelectorAll('form > div')?.[1]?.querySelectorAll('button')?.[1]?.getAttribute('id'), 'clear'); ``` -Your second `button` element should have the text `Clear`. +O segundo elemento `button` deve ter o texto `Clear`. ```js assert.equal(document.querySelectorAll('form > div')?.[1]?.querySelectorAll('button')?.[1]?.innerText, 'Clear'); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60cfaca25bb27edd40f62.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60cfaca25bb27edd40f62.md index 91572e5303a..695093052d6 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60cfaca25bb27edd40f62.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60cfaca25bb27edd40f62.md @@ -7,7 +7,7 @@ dashedName: step-13 # --description-- -Finally, you need to link your JavaScript file to your HTML. Create a `script` element to do so. +Por fim, você precisa vincular o arquivo de JavaScript ao seu HTML. Crie um elemento `script` para fazer isso. # --hints-- @@ -17,7 +17,7 @@ Você deve ter apenas um elemento `script`. assert.isAtLeast(document.querySelectorAll('script')?.length, 1); ``` -Your `script` element should have the `src` set to `./script.js`. +O elemento `script` deve ter o `src` definido como `./script.js`. ```js assert.match(code, /script\s*?src\s*?=\s*?('|")(\.\/)?script\.js\1/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60d3c5048302906962231.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60d3c5048302906962231.md index 4301e367e87..605a33bc536 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60d3c5048302906962231.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b60d3c5048302906962231.md @@ -7,23 +7,23 @@ dashedName: step-14 # --description-- -It is time to start writing the script that makes your form work. Begin by getting the `form` element (using the `id`) and storing it in a variable called `calorieCounter`. +É hora de começar a escrever o script que faz o formulário funcionar. Comece obtendo o elemento `form` (usando o `id`) e armazenando-o em uma variável chamada `calorieCounter`. # --hints-- -You should create a variable called `calorieCounter`. +Você deve criar uma variável chamada `calorieCounter`. ```js assert.isDefined(calorieCounter); ``` -You should use `document.getElementById()` to get the `#calorie-counter` element. +Você deve usar `document.getElementById()` para obter o elemento `#calorie-counter`. ```js assert.match(code, /document\.getElementById\(\s*('|")calorie-counter\1\s*\)/g); ``` -You should store the `#calorie-counter` element in a variable called `calorieCounter`. +Você deve armazenar o elemento `#calorie-counter` em uma variável chamada `calorieCounter`. ```js assert.equal(calorieCounter, document.getElementById('calorie-counter')); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b614e6a1f7fe2cef6312dc.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b614e6a1f7fe2cef6312dc.md index 4480dc866a3..eaa1a0f61aa 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b614e6a1f7fe2cef6312dc.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b614e6a1f7fe2cef6312dc.md @@ -7,23 +7,23 @@ dashedName: step-17 # --description-- -Declare an `isError` variable and set it to `false`, but use `let` so you can reassign it later. +Declare uma variável `isError` e defina-a como `false`, mas use `let` para que você possa reatribuir seu valor mais tarde. # --hints-- -You should declare an `isError` variable. +Você deve declarar uma variável `isError`. ```js assert.isDefined(isError); ``` -Your `isError` variable should be set to `false`. +A variável `isError` deve ser definida como `false`. ```js assert.isFalse(isError); ``` -You should use `let` to declare your `isError` variable. +Você deve usar `let` para declarar a variável `isError`. ```js assert.match(code, /let\s+isError\s*=\s*false/g); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b61584def8fa2ebcc259e0.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b61584def8fa2ebcc259e0.md index ce661339315..81ef4960d3d 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b61584def8fa2ebcc259e0.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63b61584def8fa2ebcc259e0.md @@ -7,19 +7,19 @@ dashedName: step-19 # --description-- -You need to split your `str` into individual characters. Remember that strings have a `.split()` method, and if you pass an empty string it will split on every character. +Você precisa dividir `str` em caracteres individuais. Lembre-se de que as strings têm um método `.split()`. Se você passar para ele uma string vazia, elas serão divididas em cada caractere. -Declare a `strArray` variable and assign it that split value. +Declare uma variável `strArray` e atribua a ela o valor de split. # --hints-- -Your `cleanInputString` function should declare a `strArray` variable. +A função `cleanInputString` deve declarar uma variável `strArray`. ```js assert.match(cleanInputString.toString(), /strArray\s*=/); ``` -Your `strArray` variable should be assigned the value of `str.split('')`. +A variável `strArray` deve receber por atribuição o valor de `str.split('')`. ```js assert.match(cleanInputString.toString(), /strArray\s*=\s*str\.split\(\s*('|")\1\s*\)/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf45ce0dc8d4270760c6d0.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf45ce0dc8d4270760c6d0.md index 7b6c80457ce..16c04e01f78 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf45ce0dc8d4270760c6d0.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf45ce0dc8d4270760c6d0.md @@ -7,32 +7,32 @@ dashedName: step-22 # --description-- -Within your loop, you need to check if the character in `strArray` at index `i` is not `+`, `-`, or a space. If it is not, `push` it to the `cleanStrArray`. +Dentro do laço, você precisa verificar se o caractere em `strArray` no índice `i` não é `+`, `-` ou um espaço. Se não for, faça o `push` do caractere (em outras palavras, insira-o) em `cleanStrArray`. -To check your character, see if the array `["+", "-", " "]` includes the character – you can use the `.includes()` method on the array to do this. +Para verificar o caractere, veja se o array `["+", "-", " "]` inclui o caractere – você pode usar o método `.includes()` no array para fazer isso. # --hints-- -Your `for` loop should have an `if` statement. +O laço `for` deve ter uma instrução `if`. ```js assert.match(cleanInputString.toString(), /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;\s*i\s*<\s*strArray\.length\s*;\s*i\s*\+\+\s*\)\s*\{\s*if\s*\(/); ``` -Your `for` loop should use `!["+", "-", " "].includes()`. +O laço `for` deve usar `!["+", "-", " "].includes()`. ```js // the loop protection injects code so we have to look at the raw code directly assert.match(code, /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;\s*i\s*<\s*strArray\.length\s*;\s*i\s*\+\+\s*\)\s*\{\s*if\s*\(!\[("|')\+\2\s*,\s*("|')-\3\s*,\s*("|')\s\4\s*\]\.includes\(/); ``` -Your `for` loop should see if `strArray[i]` is found in `["+", "-", " "]`. +O laço `for` deve conferir se `strArray[i]` é encontrado em `["+", "-", " "]`. ```js assert.match(code, /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;\s*i\s*<\s*strArray\.length\s*;\s*i\s*\+\+\s*\)\s*\{\s*if\s*\(!\[("|')\+\2\s*,\s*("|')-\3\s*,\s*("|')\s\4\s*\]\.includes\(\s*strArray\[i\]\s*\)\)\s*\{/); ``` -Your `for` loop should `push` `strArray[i]` to `cleanStrArray`. +O laço `for` deve fazer o `push` de `strArray[i]` (inseri-lo) em `cleanStrArray`. ```js assert.match(code, /for\s*\(\s*(let|var)\s+i\s*=\s*0\s*;\s*i\s*<\s*strArray\.length\s*;\s*i\s*\+\+\s*\)\s*\{\s*if\s*\(!\[("|')\+\2\s*,\s*("|')-\3\s*,\s*("|')\s\4\s*\]\.includes\(\s*strArray\[i\]\s*\)\)\s*\{\s*cleanStrArray\.push\(\s*strArray\[i\]\s*\)\s*\}/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf461011fca327d3b60fa8.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf461011fca327d3b60fa8.md index 142f6d51da5..6dceb51c88e 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf461011fca327d3b60fa8.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf461011fca327d3b60fa8.md @@ -7,43 +7,43 @@ dashedName: step-23 # --description-- -While looping through the string works, creating a new array is inefficient for memory and runtime performance. Instead, you can use Regular Expressions (referred to as "regex") to match specific characters. +Embora percorrer a string funcione, a criação de um array é ineficiente para o desempenho de memória e do tempo de execução. Em vez disso, você pode usar Expressões Regulares (também conhecidas como "regex") para fazer a correspondência a caracteres específicos. -Regex in JavaScript is indicated by a pattern wrapped in forward slashes – for example: +Regex em JavaScript são indicadas por um padrão encapsulado em barras para frente – por exemplo: ```js const regex = /hello/; ``` -Remove your existing code within the `cleanInputString` function. Declare a `regex` variable and assign it the value from the example above. +Remova o código existente dentro da função `cleanInputString`. Declare uma variável `regex` e atribua a ela o valor a partir do exemplo acima. # --hints-- -You should remove the `cleanStrArray` variable. +Você deve remover a variável `cleanStrArray`. ```js assert.notMatch(cleanInputString.toString(), /cleanStrArray/); ``` -You should remove the `strArray` variable. +Você deve remover a variável `strArray`. ```js assert.notMatch(cleanInputString.toString(), /strArray/); ``` -You should not have a `for` loop. +Você não deve ter um laço `for`. ```js assert.notMatch(cleanInputString.toString(), /for/); ``` -You should declare a `regex` variable. +Você deve declarar uma variável `regex`. ```js assert.match(cleanInputString.toString(), /regex\s*=/); ``` -Your `regex` variable should be set to the regular expression `/hello/`. +A variável `regex` deve ser definida como a expressão regular `/hello/`. ```js assert.match(cleanInputString.toString(), /regex\s*=\s*\/hello\//); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf47fd40599f29827f484d.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf47fd40599f29827f484d.md index 1ea45ab5d48..ed4545fa09c 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf47fd40599f29827f484d.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf47fd40599f29827f484d.md @@ -7,13 +7,13 @@ dashedName: step-24 # --description-- -The pattern you currently have will match the exact text `hello`, which is not what you want to match. You want to look for `+`, `-`, or spaces. Replace the pattern in your `regex` variable with `\+-` to look for plus and minus characters. +O padrão que você tem atualmente corresponderá exatamente ao texto `hello`, que não é a correspondência que você deseja ter. Você quer procurar por `+`, `-` ou espaços. Substitua o padrão na variável `regex` por `\+-` para procurar os caracteres dos sinais de mais e de menos. -Note that you need to use the `\` to escape the `+`, because a `+` has a special meaning in regular expressions. +Observe que você precisa usar `\` para escapar o `+`, porque `+` tem um significado especial em expressões regulares. # --hints-- -Your `regex` variable should be set to the regular expression `/\+-/`. +A variável `regex` deve ser definida como a expressão regular `/\+-/`. ```js assert.match(cleanInputString.toString(), /regex\s*=\s*\/\\\+-\//); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c1dfbd56c71e278800010c.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c1dfbd56c71e278800010c.md index c2f58a4b7f4..736fb141404 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c1dfbd56c71e278800010c.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c1dfbd56c71e278800010c.md @@ -7,25 +7,25 @@ dashedName: step-37 # --description-- -You'll need to know which category the entry goes in. Thankfully, you added a dropdown for the user to select a category. +Você precisará saber em qual categoria a entrada se encaixa. Felizmente, você adicionou uma lista suspensa para o usuário selecionar uma categoria. -Remember that you queried that dropdown earlier in your JavaScript and assigned it to the `entryDropdown` button. Use concatenation to add `#` to the beginning of the `value` property of `entryDropdown`, and assign that result to a `targetId` variable. +Lembre-se de que você já consultou a lista suspensa antes no JavaScript e a atribuiu ao botão `entryDropdown`. Use a concatenação para adicionar `#` ao início da propriedade `value` de `entryDropdown` e atribua esse resultado à variável `targetId`. # --hints-- -Your `addEntry` function should have a `targetId` variable. +A função `addEntry` deve ter uma variável `targetId`. ```js assert.match(addEntry.toString(), /targetId\s*=/); ``` -Your `targetId` variable should start with the string `#`. +A variável `targetId` deve começar com a string `#`. ```js assert.match(addEntry.toString(), /targetId\s*=\s*('|")#\1/); ``` -You should use concatenation to add `entryDropdown.value` after your `#` string. +Você deve usar a concatenação para adicionar `entryDropdown.value` após a string `#`. ```js assert.match(addEntry.toString(), /targetId\s*=\s*('|")#\1\s*\+\s*entryDropdown\.value/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c216da562fbb3957b9cb2c.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c216da562fbb3957b9cb2c.md index 3d79a788f5b..9f0ad40fde8 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c216da562fbb3957b9cb2c.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c216da562fbb3957b9cb2c.md @@ -7,17 +7,17 @@ dashedName: step-43 # --description-- -Now you need to build your dynamic HTML string to add to the webpage. Declare a new `HTMLString` variable, and assign it an empty template literal string. +Agora, você precisa criar a string HTML dinâmica para adicionar à página da web. Declare uma nova variável `HTMLString` e atribua a ela uma string vazia de template literals. # --hints-- -Your `addEntry` function should have an `HTMLString` variable. +A função `addEntry` deve ter uma variável `HTMLString`. ```js assert.match(addEntry.toString(), /HTMLString\s*=/) ``` -Your `HTMLString` should be an empty template literal. +`HTMLString` deve ser uma template literal vazia. ```js assert.match(code, /HTMLString\s*=\s*``/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21839f56eaf3ef4e027c4.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21839f56eaf3ef4e027c4.md index bd5f9fc00d5..4477e25bbf5 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21839f56eaf3ef4e027c4.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21839f56eaf3ef4e027c4.md @@ -7,7 +7,7 @@ dashedName: step-47 # --description-- -Create another `label` element (on a new line) at the end of your `HTMLString`. This `label` should have the text `Entry # Calories`, using your template literal syntax to replace `#` with the value of `entryNumber`, and the `for` attribute set to `X-#-calories`, where `X` is the `value` of `entryDropdown` and `#` is the value of `entryNumber`. +Crie outro elemento `label` (em uma nova linha) no final de `HTMLString`. Esse `label` deve ter o texto `Entry # Calories`, usando a sintaxe de template literals para substituir `#` pelo valor de `entryNumber`, bem como o atributo `for` definido como `X-#-calories`, onde `X` é o `value` (valor) de `entryDropdown` e `#` é o valor de `entryNumber`. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c2194dce265f429300c8b1.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c2194dce265f429300c8b1.md index fc300851222..320253e00c8 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c2194dce265f429300c8b1.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c2194dce265f429300c8b1.md @@ -7,13 +7,13 @@ dashedName: step-51 # --description-- -Try adding a couple of entries to the `Breakfast` category, and you may notice some bugs! The first thing we need to fix is the entry counts – the first entry should have a count of `1`, not `0`. +Tente adicionar algumas entradas à categoria `Breakfast`. Você poderá notar alguns erros! A primeira coisa que precisamos corrigir é a contagem de entradas – a primeira entrada deve ter uma contagem de `1`, não `0`. -This bug occurs because you are querying for `input[type="text"]` elements *before* adding the new entry to the page. To fix this, update your `entryNumber` variable to be the value of the `length` of the query plus `1`. Add this on your declaration line, not in your template strings. +Este bug ocorre porque você está consultando elementos `input[type="text"]` *antes de* adicionar a nova entrada à página. Para corrigir isso, atualize a variável `entryNumber` para que seja o valor de `length` da consulta mais `1`. Adicione isso à linha da declaração, não às strings de template literals. # --hints-- -You should add `1` to the `.length` of your `querySelectorAll()` method. +Você deve adicionar `1` a `.length` do método `querySelectorAll()`. ```js assert.match(addEntry.toString(), /entryNumber\s*=\s*targetInputContainer\.querySelectorAll\(\s*'input\[type="text"]'\)\.length\s*\+\s*1/) diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21d4f48267a47c2946788.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21d4f48267a47c2946788.md index fca5d722b71..6f28b8a95bd 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21d4f48267a47c2946788.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21d4f48267a47c2946788.md @@ -7,27 +7,27 @@ dashedName: step-54 # --description-- -Great! Now you can add entries without losing your previous inputs. +Ótimo! Agora, você pode adicionar entradas sem perder os inputs anteriores. -Your next step is to write a function that will get the calorie counts from the user's entries. +O próximo passo é escrever uma função que obterá a contagem de calorias a partir das entradas do usuário. -Declare a `getCaloriesFromInputs` function, and give it a parameter called `list`. +Declare uma função `getCaloriesFromInputs` e dê a ela um parâmetro chamado `list`. # --hints-- -You should declare a `getCaloriesFromInputs` variable. +Você deve declarar uma variável `getCaloriesFromInputs`. ```js assert.isDefined(getCaloriesFromInputs); ``` -Your `getCaloriesFromInputs` variable should be a function. +A variável `getCaloriesFromInputs` deve ser uma função. ```js assert.isFunction(getCaloriesFromInputs); ``` -Your `getCaloriesFromInputs` function should take a parameter called `list`. +A função `getCaloriesFromInputs` deve receber um parâmetro chamado `list`. ```js assert.match(getCaloriesFromInputs?.toString(), /\(\s*list\s*\)/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8be904ffff922f3c6f8d0.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8be904ffff922f3c6f8d0.md index 0f0c294f96d..4a7900517a9 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8be904ffff922f3c6f8d0.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c8be904ffff922f3c6f8d0.md @@ -7,25 +7,25 @@ dashedName: step-58 # --description-- -Remember that you wrote a function earlier to clean the user's input? You'll need to use that function here. +Você se lembra de ter escrito uma função antes para limpar a entrada do usuário? Você precisará usar essa função aqui. -Update your `currVal` declaration to be the result of calling `cleanInputString` with `list[i].value`. +Atualize a declaração de `currVal` para que seja o resultado da chamada de `cleanInputString` com `list[i].value`. # --hints-- -Your `getCaloriesFromInputs` function should call your `cleanInputString` function. +A função `getCaloriesFromInputs` deve chamar a função `cleanInputString`. ```js assert.match(getCaloriesFromInputs.toString(), /cleanInputString\(/); ``` -You should pass `list[i].value` as the parameter for `cleanInputString`. +Você deve passar `list[i].value` como o parâmetro para `cleanInputString`. ```js assert.match(getCaloriesFromInputs.toString(), /cleanInputString\(\s*list\[i\]\.value\)/); ``` -You should assign the result of your `cleanInputString` call to your `currVal` variable. +Você deve atribuir o resultado da chamada de `cleanInputString` à variável `currVal`. ```js assert.match(getCaloriesFromInputs.toString(), /currVal\s*=\s*cleanInputString\(\s*list\[i\]\.value\)/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bcc26219e7090da0f549.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bcc26219e7090da0f549.md index 681b1b7ac4a..b4f67090be1 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bcc26219e7090da0f549.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bcc26219e7090da0f549.md @@ -7,17 +7,17 @@ dashedName: step-62 # --description-- -Still within your `if` block, set `isError` to `true` and return `null`. +Ainda dentro do bloco do `if`, defina `isError` como `true` e retorne `null`. # --hints-- -After your `alert`, you should set `isError` to `true`. +Após o `alert`, você deve definir `isError` para `true`. ```js assert.match(code.split("function getCaloriesFromInputs")[1], /alert\(`Invalid Input: \${invalidInputMatch\[0\]}`\s*\);\s*isError\s*=\s*true/); ``` -After you modify `isError`, you should `return` the value `null`. +Após modificar `isError`, você deve usar `return` para retornar o valor `null`. ```js assert.match(code.split("function getCaloriesFromInputs")[1], /alert\(`Invalid Input: \${invalidInputMatch\[0\]}`\s*\);\s*isError\s*=\s*true;?\s*return\s+null;?\s*\}/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bce376ca4f09c15a3768.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bce376ca4f09c15a3768.md index a43f4c1d35e..cc62445a2a6 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bce376ca4f09c15a3768.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bce376ca4f09c15a3768.md @@ -7,31 +7,31 @@ dashedName: step-63 # --description-- -Remember that `return` ends the execution of a function. After your `if` block, you need to handle the logic for when the input is valid. Because your `if` statement returns a value, you do not need an `else` statement. +Lembre-se de que `return` termina a execução de uma função. Após o bloco de `if`, você precisa tratar da lógica para quando a entrada for válida. Como a instrução `if` retorna um valor, você não precisa de uma instrução `else`. -Use the addition assignment operator to add `currVal` to your `calories` total. You'll need to use the `Number` constructor to convert `currVal` to a number. +Use o operador de atribuição de adição para adicionar `currVal` ao total de `calories`. Você precisará usar o construtor `Number` para converter `currVal` em um número. # --hints-- -You should not add an `else` statement. +Você não deve adicionar uma instrução `else`. ```js assert.notMatch(getCaloriesFromInputs.toString(), /else/); ``` -After your `if` statement, you should use the addition assignment operator on `calories`. +Após a instrução `if`, você deve usar o operador de atribuição de adição em `calories`. ```js assert.match(getCaloriesFromInputs.toString(), /if.*}\s*calories\s*\+=/s); ``` -You should pass `currVal` to the `Number()` constructor. +Você deve passar `currVal` para o construtor `Number()`. ```js assert.match(getCaloriesFromInputs.toString(), /Number\(\s*currVal\s*\)/); ``` -You should add the value of `Number(currVal)` to `calories`. +Você deve adicionar o valor de `Number(currVal)` a `calories`. ```js assert.match(getCaloriesFromInputs.toString(), /calories\s*\+=\s*Number\(\s*currVal\s*\)/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bef7fec05c0d38853828.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bef7fec05c0d38853828.md index 0a6708f076f..ac73072dfb9 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bef7fec05c0d38853828.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9bef7fec05c0d38853828.md @@ -7,19 +7,19 @@ dashedName: step-66 # --description-- -You will be attaching this function to the `submit` event of the form. The `submit` event is triggered when the form is submitted. The default action of the `submit` event is to reload the page. You need to prevent this default action using the `preventDefault()` method of your `e` parameter. +Você vai anexar essa função ao evento `submit` do formulário. O evento `submit` é acionado quando o formulário é enviado. A ação padrão do evento `submit` é recarregar a página. Você precisa evitar essa ação padrão usando o método `preventDefault()` do parâmetro `e`. -Add a line to your `calculateCalories` function that calls the `preventDefault()` method on the `e` parameter. Then, reset your global error flag to `false`. +Adicione uma linha à função `calculateCalories` que chame o método `preventDefault()` no parâmetro `e`. Em seguida, redefina sua falg de erro global como `false`. # --hints-- -Your `calculateCalories` function should call `e.preventDefault()`. +A função `calculateCalories` deve chamar `e.preventDefault()`. ```js assert.match(calculateCalories.toString(), /e\.preventDefault\(\)/); ``` -Your `calculateCalories` function should reset the global error flag to `false`. +A função `calculateCalories` deve redefinir a flag de erro global como `false`. ```js assert.match(calculateCalories.toString(), /isError\s*=\s*false/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9c09a7daa4f0ff92c4023.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9c09a7daa4f0ff92c4023.md index 8780a4c226e..f4f3ab64f5f 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9c09a7daa4f0ff92c4023.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9c09a7daa4f0ff92c4023.md @@ -7,23 +7,23 @@ dashedName: step-68 # --description-- -Using that same syntax, query your `number` inputs in the `#lunch` element and assign them to `lunchNumberInputs`. +Usando essa mesma sintaxe, consulte os inputs do tipo `number` no elemento `#lunch` e atribua-os a `lunchNumberInputs`. # --hints-- -You should declare a `lunchNumberInputs` variable. +Você deve declarar uma variável `lunchNumberInputs`. ```js assert.match(calculateCalories.toString(), /lunchNumberInputs\s*=/); ``` -You should call `document.querySelectorAll()` with `#lunch input[type=number]`. +Você deve chamar `document.querySelectorAll()` com `#lunch input[type=number]`. ```js assert.match(calculateCalories.toString(), /document\.querySelectorAll\(('|")#lunch input\[type=number\]\1\)/); ``` -You should assign the result of your `document.querySelectorAll()` call to `lunchNumberInputs`. +Você deve atribuir o resultado da chamada de `document.querySelectorAll()` a `lunchNumberInputs`. ```js assert.match(calculateCalories.toString(), /lunchNumberInputs\s*=\s*document\.querySelectorAll\(('|")#lunch input\[type=number\]\1\)/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e3a83bb3e61a80eea564.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e3a83bb3e61a80eea564.md index a0146d735c2..db5d44b4e2b 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e3a83bb3e61a80eea564.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e3a83bb3e61a80eea564.md @@ -7,27 +7,27 @@ dashedName: step-73 # --description-- -You also need to get the value of your `#budget` input. You already queried this at the top of your code, and set it to the `budgetNumberInput` variable. However, you used `getElementById`, which returns an `Element`, not a `NodeList`. +Você também precisa obter o valor do input `#budget`. Você já o consultou no início do código e o colocou na variável `budgetNumberInput`. No entanto, você usou `getElementById`, que retorna um `Element`, não uma `NodeList`. -A `NodeList` is an array-like, which means you can iterate through it and it shares some common methods with an array. For your `getCaloriesFromInputs` function, an array will work for the argument just as well as a `NodeList` does. +Uma `NodeList` é um tipo de array, o que significa que você pode percorrê-la e que ela compartilha alguns métodos comuns com um array. Para a função `getCaloriesFromInputs`, tanto um array quanto uma `NodeList` funcionarão como argumento. -Declare a `budgetCalories` variable and set it to the result of calling `getCaloriesFromInputs` – pass an array containing your `budgetNumberInput` as the argument. +Declare uma variável `budgetCalories` e atribua a ela o resultado da chamada de `getCaloriesFromInputs` – passe um array contendo `budgetNumberInput` como o argumento. # --hints-- -Your `calculateCalories` function should have a `budgetCalories` variable. +A função `calculateCalories` deve ter uma variável `budgetCalories`. ```js assert.match(calculateCalories.toString(), /budgetCalories\s*=/); ``` -You should call `getCaloriesFromInputs` with `[budgetNumberInput]` as the argument. +Você deve chamar `getCaloriesFromInputs` com `[budgetNumberInput]` como o argumento. ```js assert.match(calculateCalories.toString(), /getCaloriesFromInputs\s*\(\s*\[\s*budgetNumberInput\s*\]\s*\)/); ``` -You should assign the result of `getCaloriesFromInputs` to `budgetCalories`. +Você deve atribuir o resultado de `getCaloriesFromInputs` a `budgetCalories`. ```js assert.match(calculateCalories.toString(), /budgetCalories\s*=\s*getCaloriesFromInputs\s*\(\s*\[\s*budgetNumberInput\s*\]\s*\)/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e45519caf31b987fbb5f.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e45519caf31b987fbb5f.md index 27a72eceec2..7cddf1e7a58 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e45519caf31b987fbb5f.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e45519caf31b987fbb5f.md @@ -7,23 +7,23 @@ dashedName: step-74 # --description-- -Your `getCaloriesFromInputs` function will set the global error flag to `true` if an invalid input is detected. Add an `if` statement to your `calculateCalories` function that checks the truthiness of your global error flag, and if it is truthy then use `return` to end the function execution. +A função `getCaloriesFromInputs` definirá a flag de erro global como `true` se uma entrada inválida for detectada. Adicione uma instrução `if` na função `calculateCalories` que verifique se a flag de erro global é considerada verdadeira. Se for, use `return` para terminar a execução da função. # --hints-- -Your `calculateCalories` function should have an `if` statement. +A função `calculateCalories` deve ter uma instrução `if`. ```js assert.match(calculateCalories.toString(), /if\s*\(/); ``` -Your `if` statement should check the truthiness of the `isError` variable. +A instrução `if` deve verificar se a variável `isError` é considerada verdadeira. ```js assert.match(calculateCalories.toString(), /if\s*\(\s*isError\s*\)/); ``` -Your `if` statement should use `return` to end the function execution. +A instrução `if` deve usar `return` para terminar a execução da função. ```js assert.match(calculateCalories.toString(), /if\s*\(\s*isError\s*\)\s*\{?\s*return;?\s*\}?\s*/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e6b7c0303524af2d0bc2.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e6b7c0303524af2d0bc2.md index e2a1355507e..ec33dc116ba 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e6b7c0303524af2d0bc2.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e6b7c0303524af2d0bc2.md @@ -7,11 +7,11 @@ dashedName: step-80 # --description-- -Give your span the text `remainingCalories Calorie surplusOrDeficit`, using interpolation to replace `remainingCalories` and `surplusOrDeficit` with the appropriate variables. +Dê ao span o texto `remainingCalories Calorie surplusOrDeficit`, usando a interpolação para substituir `remainingCalories` e `surplusOrDeficit` pelas variáveis apropriadas. # --hints-- -Your `span` should have the text `${remainingCalories} Calorie ${surplusOrDeficit}`. +O `span` deve ter o texto `${remainingCalories} Calorie ${surplusOrDeficit}`. ```js const htmlString = code.split(/output\s*\.\s*innerHTML\s*=\s*/)[1].split(/`/)[1]; diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e7d5b21eee2776ecc226.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e7d5b21eee2776ecc226.md index c86894e1a85..014cd427eaf 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e7d5b21eee2776ecc226.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c9e7d5b21eee2776ecc226.md @@ -7,27 +7,27 @@ dashedName: step-82 # --description-- -After your `span` element, add an `hr` element to create a horizontal line. +Após o elemento `span`, adicione um elemento `hr` para criar uma linha horizontal. -To keep your code clean and readable, you should add this on a new line in the template literal. +Para manter seu código limpo e legível, você deve adicionar isso a uma nova linha no template literal. # --hints-- -You should add an `hr` element to your `output.innerHTML` string. +Você deve adicionar um elemento `hr` à string `output.innerHTML`. ```js const htmlString = code.split(/output\s*\.\s*innerHTML\s*=\s*/)[1].split(/`/)[1]; assert.match(htmlString, //); ``` -Your `hr` element should come after your `span` element. +O elemento `hr` deve vir depois do elemento `span`. ```js const htmlString = code.split(/output\s*\.\s*innerHTML\s*=\s*/)[1].split(/`/)[1]; assert.isAbove(htmlString.indexOf('/); ``` -Your `p` element should come after your `hr` element. +O elemento `p` deve vir depois do elemento `hr`. ```js const htmlString = code.split(/output\s*\.\s*innerHTML\s*=\s*/)[1].split(/`/)[1]; assert.isAbove(htmlString.indexOf(' { - const t = new Thermostat(122); - return typeof t === 'object'; - })() -); +const _t = new Thermostat(122); +assert.isObject(_t); ``` Коли значення за Фаренгейтом буде реалізоване, `Thermostat` повинен встановити правильну `temperature`. ```js -assert( - (() => { - const t = new Thermostat(122); - return t.temperature === 50; - })() -); +const _t = new Thermostat(122); +assert.strictEqual(_t?.temperature, 50); ``` `getter` має бути визначеним. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.get === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.get); ``` `setter` має бути визначеним. ```js -assert( - (() => { - const desc = Object.getOwnPropertyDescriptor( - Thermostat.prototype, - 'temperature' - ); - return !!desc && typeof desc.set === 'function'; - })() -); +const _desc = Object.getOwnPropertyDescriptor(Thermostat.prototype, 'temperature'); +assert.isFunction(_desc?.set); ``` Виклик `setter` зі значенням за Цельсієм має встановити `temperature`. ```js -assert( - (() => { - const t = new Thermostat(32); - t.temperature = 26; - const u = new Thermostat(32); - u.temperature = 50; - return t.temperature === 26 && u.temperature === 50; - })() -); +const _t = new Thermostat(32); +_t.temperature = 26; +const _u = new Thermostat(32); +_u.temperature = 50; +assert.approximately(_t.temperature, 26, 0.1); +assert.approximately(_u.temperature, 50, 0.1); ``` # --seed--