diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-operator-to-reassign-array-elements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-operator-to-reassign-array-elements.english.md index 65b56a48b0..09ea6b60e7 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-operator-to-reassign-array-elements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-operator-to-reassign-array-elements.english.md @@ -24,11 +24,11 @@ Use destructuring assignment with the rest operator to perform an effective arr should be [3,4,5,6,7,8,9,10] - testString: assert(arr.every((v, i) => v === i + 3) && arr.length === 8,'arr should be [3,4,5,6,7,8,9,10]'); + testString: assert(arr.every((v, i) => v === i + 3) && arr.length === 8); - text: Array.slice() should not be used. - testString: getUserInput => assert(!getUserInput('index').match(/slice/g), 'Array.slice() should not be used.'); + testString: getUserInput => assert(!getUserInput('index').match(/slice/g)); - text: Destructuring on list should be used. - testString: getUserInput => assert(getUserInput('index').match(/\s*\[\s*,\s*,\s*\.\.\.\s*arr\s*\]\s*=\s*list\s*/g), 'Destructuring on list should be used.'); + testString: assert(code.replace(/\s/g, '').match(/\[(([_$a-z]\w*)?,){1,}\.\.\.arr\]=list/i)); ```