From 27a59c541873214edccfca00427e42f056a4b536 Mon Sep 17 00:00:00 2001 From: Alan Price <23743415+alanpaulprice@users.noreply.github.com> Date: Wed, 6 Mar 2019 23:30:58 +0000 Subject: [PATCH] fix: reworded text messages (#27072) --- ...concise-declarative-functions-with-es6.english.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); ```