@@ -19,7 +19,7 @@ localeTitle: Добавить новые объекты в объект JavaScri
tests:
- text: Добавьте свойство "bark" в myDog .
testString: 'assert(myDog.bark !== undefined, "Add the property "bark" to myDog.");'
- - text: Не добавляйте "bark" в раздел настройки
+ - text: Не добавляйте свойство "bark" в раздел // Setup
testString: 'assert(!/bark[^\n]:/.test(code), "Do not add "bark" to the setup section");'
```
@@ -34,13 +34,13 @@ tests:
```js
// Example
var ourDog = {
- "name": "Camper",
+ "name": "Барбос",
"legs": 4,
"tails": 1,
"friends": ["everything!"]
};
-ourDog.bark = "bow-wow";
+ourDog.bark = "гав-гав";
// Setup
var myDog = {
@@ -61,7 +61,7 @@ var myDog = {
```js
-console.info('after the test');
+(function(z){return z;})(myDog);
```
@@ -72,6 +72,12 @@ console.info('after the test');
```js
-// solution required
+var myDog = {
+ "name": "Happy Coder",
+ "legs": 4,
+ "tails": 1,
+ "friends": ["freeCodeCamp Campers"]
+};
+myDog.bark = "Гав";
```