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:
Ashraf Nazar
2020-04-23 20:59:58 +01:00
committed by GitHub
parent 1f4fa6f442
commit c2558b3816

View File

@ -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>