Issue #36564 update regex for spread operator (#36565)

* Issue #36564 update regex for spread operator

* Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md

Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
This commit is contained in:
enrider
2019-08-06 17:56:48 -04:00
committed by Randell Dawson
parent d93e96da2f
commit 76bd5f4fc3

View File

@ -45,7 +45,7 @@ tests:
- text: <code>arr2</code> should be correct copy of <code>arr1</code>.
testString: assert(arr2.every((v, i) => v === arr1[i]));
- text: <code>...</code> spread operator was used to duplicate <code>arr1</code>.
testString: assert(code.match(/\[\s*...arr1\s*\]/g));
testString: assert(code.match(/Array\(\s*\.\.\.arr1\s*\)|\[\s*\.\.\.arr1\s*\]/));
- text: <code>arr2</code> should remain unchanged when <code>arr1</code> is changed.
testString: assert((arr1, arr2) => {arr1.push('JUN'); return arr2.length < arr1.length});