fix(Curriculum): ensure code that includes and is not equal to the fl… (#38497)
* fix(Curriculum): ensure code that includes and is not equal to the flat or flatMap methods do not fail the test suite * Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * Update steamroller.english.md Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
@ -33,7 +33,7 @@ tests:
|
||||
- text: <code>steamrollArray([1, {}, [3, [[4]]]])</code> should return <code>[1, {}, 3, 4]</code>.
|
||||
testString: assert.deepEqual(steamrollArray([1, {}, [3, [[4]]]]), [1, {}, 3, 4]);
|
||||
- text: Your solution should not use the <code>Array.prototype.flat()</code> or <code>Array.prototype.flatMap()</code> methods.
|
||||
testString: assert(!code.match(/\.?[\s\S]*?flat/) && !code.match(/\.?[\s\S]*?flatMap/));
|
||||
testString: assert(!code.match(/\.\s*flat\s*\(/) && !code.match(/\.\s*flatMap\s*\(/));
|
||||
```
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user