diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields.english.md
index 726a86a6ee..3ac0037726 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields.english.md
@@ -17,7 +17,7 @@ Here is the same function from above rewritten to use this new syntax:
## Instructions
-Use simple fields with object literals to create and return a Person
object.
+Use simple fields with object literals to create and return a Person
object with name
, age
and gender
properties.
## Tests
@@ -25,10 +25,10 @@ Use simple fields with object literals to create and return a Person
{name: "Zodiac Hasbro", age: 56, gender: "male"}.'
- testString: 'assert(() => {const res={name:"Zodiac Hasbro",age:56,gender:"male"}; const person=createPerson("Zodiac Hasbro", 56, "male"); return Object.keys(person).every(k => person[k] === res[k]);}, ''the output is {name: "Zodiac Hasbro", age: 56, gender: "male"}
.'');'
- - text: No :
were used.
- testString: getUserInput => assert(!getUserInput('index').match(/:/g), 'No :
were used.');
+ - text: 'The output is {name: "Zodiac Hasbro", age: 56, gender: "male"}
.'
+ testString: 'assert((() => {const res={name:"Zodiac Hasbro",age:56,gender:"male"}; const person=createPerson("Zodiac Hasbro", 56, "male"); return Object.keys(person).every(k => person[k] === res[k]);})(), ''The output is {name: "Zodiac Hasbro", age: 56, gender: "male"}
.'');'
+ - text: No key:value
were used.
+ testString: getUserInput => assert(!getUserInput('index').match(/:/g), 'No key:value
were used.');
```
@@ -63,6 +63,13 @@ console.log(createPerson("Zodiac Hasbro", 56, "male")); // returns a proper obje
```js
-// solution required
+const createPerson = (name, age, gender) => {
+ "use strict";
+ return {
+ name,
+ age,
+ gender
+ };
+};
```