diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-declarative-functions-with-es6.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-declarative-functions-with-es6.english.md index b1836c1f4d..da55e26ff6 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-declarative-functions-with-es6.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-declarative-functions-with-es6.english.md @@ -22,12 +22,12 @@ Refactor the function setGear inside the object bicycle assert(!getUserInput('index').match(/function/),'Traditional function expression was not used.'); - - text: setGear is a declarative function. - testString: getUserInput => assert(typeof bicycle.setGear === 'function' && getUserInput('index').match(/setGear\s*\(.+\)\s*\{/), 'setGear is a declarative function.'); - - text: bicycle.setGear(48) changes the gear value to 48. - testString: assert((new bicycle.setGear(48)).gear === 48, 'bicycle.setGear(48) changes the gear value to 48.'); + - text: Traditional function expression should not be used. + testString: getUserInput => assert(!getUserInput('index').match(/function/)); + - text: setGear should be a declarative function. + testString: getUserInput => assert(typeof bicycle.setGear === 'function' && getUserInput('index').match(/setGear\s*\(.+\)\s*\{/)); + - text: bicycle.setGear(48) should change the gear value to 48. + testString: assert((new bicycle.setGear(48)).gear === 48); ```