diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb3f62b10c336bada1c70c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb3f62b10c336bada1c70c.md index 586e7b0e079..22c9514326c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb3f62b10c336bada1c70c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb3f62b10c336bada1c70c.md @@ -24,13 +24,13 @@ assert.match(code, /\bcheckpoints\b\s*\.\s*forEach\s*\(/s); You should have a `checkpoint` parameter inside the `forEach` callback function. ```js -assert.match(code, /\s*checkpoints\s*\.\s*forEach\s*\(\s*checkpoint\s*=>\s*{/s); +assert.match(code, /\s*checkpoints\s*\.\s*forEach\s*\(\s*(\(\s*checkpoint\s*\)|checkpoint)\s*=>\s*{?/s); ``` You should call the `draw` method on each `checkpoint` inside the `forEach` callback function. ```js -assert.match(code, /\s*checkpoints\.forEach\s*\(\s*checkpoint\s*=>\s*{\s*checkpoint\.draw\(\s*\);?\s*}\s*\);?/s); +assert.match(code, /\s*checkpoints\.forEach\s*\(\s*(\(\s*checkpoint\s*\)|checkpoint)\s*=>\s*(\{\s*checkpoint\.draw\(\s*\)\s*;?\s*\}|checkpoint\.draw\(\s*\))\s*\)\s*;?/s); ``` # --seed--