* 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:
@ -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});
|
||||
|
||||
|
Reference in New Issue
Block a user