diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md index 5c168ef0b7..c871a51a9b 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md @@ -46,7 +46,7 @@ assert( 应使用 `filter` 方法。 ```js -assert(code.match(/\.filter/g)); +assert(code.match(/\s*\.\s*filter/g)); ``` 不能使用 `for` 循环。 diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md index 2b273506ab..61f6c19b75 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md @@ -46,7 +46,7 @@ assert( Tu código debe usar el método `filter`. ```js -assert(code.match(/\.filter/g)); +assert(code.match(/\s*\.\s*filter/g)); ``` El código no debe utilizar el bucle `for`.